Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scripts on Terminal Emulator

Status
Not open for further replies.

jonschofield

Technical User
Joined
Dec 16, 2002
Messages
13
Location
GB
I have scripts that I used on Terranova to perform the following command (where ext1 is an extension from an arg file):

SEND "list usage extension ext1 print\r"

Since this office has now moved to Voice over IP, the tracker has been taken out and I have to use Terminal Emulator to run the scripts. Unfortuantely, the switch has been upgraded so it no longer supports the print command.

The question then is how can I modify my scripts so that they do not stop and wait for F7 (next page) to be keyed, without using the print command?
 
Hi Jon,

Maybe you could add some sort of 3 second delay loop and then send an F7 key.

Try posting your script and maybe someone here could add this type of logic to it.

We are using a program from UtilCall that shipped with the Call Flow Extract that does this type of auditing. Maybe you could try that out as well?


 
Have you tried to schedule it as a report to go immediatly?
 
Here's my script. I can't use the print command since the switch has been upgraded but at the same time, I don't know how to send the keystroke for F7. As a consequence the script stops as soon as more than a page of data is listed. Anyone got any ideas how I can modify the script to send F7 when the switch is waiting for next page (I suppose the best way would be to add another GOTO clause)?

CAPTURE C:\USAGE

SET ext1 ""
ARGFILE "C:\CAPEXT.TXT"

LABEL 1
GETARG ext1
IF "ext1" == "1" GOTO 2
SEND "list usage extension ext1 print\r"
WAITFOR 300 "Extension not assigned" "Command successfully completed" "No data in the system to list" GOTO 1 GOTO 1 GOTO 1
LABEL 2
CAPTURE OFF
STOP

Thanks in advance for the help.
 
I had this problem a while ago but how would you send a function key to the application? I didnt get an answer the last time it came up.....

John
ski_69@hotmail.com
[bigglasses]
 
Hmmm,

It's been a while since I used Terranova but I think you can do something along the lines of:

(Very untested)

CAPTURE C:\USAGE

SET ext1 ""
ARGFILE "C:\CAPEXT.TXT"

LABEL 1
GETARG ext1
IF "ext1" == "1" GOTO 2
SEND "list usage extension ext1 print\r"
(20) <-- LINE NUMBER OF THE WAITFOR COMMAND -->
WAITFOR 300 &quot;Extension not assigned&quot; &quot;Command successfully completed&quot; &quot;No data in the system to list&quot; &quot;NEXT PAGE&quot; GOTO 1 GOTO 1 GOTO 1 GOTO 50 <-- 50 - GO'S TO THE F7 COMMAND -->
LABEL 2
CAPTURE OFF
STOP

(50) <-- MY GUESS AT THE LINE NUMBER -->
SEND &quot;\027[U&quot; <-- SEND THE F7 KEY -->
GOTO 20 <-- LINE NUMBER OF THE WAITFOR COMMAND -->


Let me know how you make out. Also did you get a chance to check out that Switch Audit program from Utilcall? It is bundled with their Call Flow Extract tool. If so, maybe we can compare some notes!

See ya
mclellan
 
All,

I've made some modifications to my script based on your suggestions:

CAPTURE C:\USAGE

SET ext1 &quot;&quot;
ARGFILE &quot;C:\CAPEXT.TXT&quot;

LABEL 1
GETARG ext1
IF &quot;ext1&quot; == &quot;1&quot; GOTO 4
SEND &quot;list usage extension ext1\r&quot;
LABEL 2
WAITFOR 300 &quot;Extension not assigned&quot; &quot;Command successfully completed&quot; &quot;No data in the system to list&quot; &quot;press CANCEL to quit -- press NEXT PAGE to continue&quot; GOTO 1 GOTO 1 GOTO 1 GOTO 4
LABEL 3
SEND &quot;\027[U&quot;
GOTO 2
LABEL 4
CAPTURE OFF
STOP

The script works fine until it gets to an extension with more than one page of information - it just seems to be waiting following &quot;press CANCEL to quit -- press NEXT PAGE to continue&quot;. The script itself doesn't seem to be the problem since if i use GOTO 4 (rather than GOTO 3) the script terminates ok - rather than just waiting for something.

Anyone got any bright ideas? Is the keystroke for F7 correct? Any help would be appreciated.
 
Hi Jon,

Can you verify if the script is at least hitting LABEL 3? It may be that the &quot;press NEXT PAGE to continue&quot; verbiage may be a little different on your switch than mine.



Barry
 
The script is definitely getting as far as LABEL 3...I changed the step to stop the script and it did that ok. I checked the PBX.KEY file in the Terminal Emulator install directory and found the keystroke was right so I'm a but stuck now.

HELP!
 
There is an error in the script I posted before: if &quot;press CANCEL to quit -- press NEXT PAGE to continue&quot; is genereated then the script goes to LABEL 4 rather than LABEL 3. I've altered that now so thats not the problem.

The script is definitely getting as far as LABEL 3...I changed the step to stop the script and it did that ok. I checked the PBX.KEY file in the Terminal Emulator install directory and found the keystroke was right so I'm a but stuck now.

HELP!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top