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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nortel script help

Status
Not open for further replies.

cog4030

IS-IT--Management
Feb 18, 2004
30
0
0
US
I built a very basic script to change the NCOS on phones.

;Recorded script. Editing may be required.
proc main
transmit "^M"
waitfor "TYPE: "
transmit "^M"
waitfor "TN "
waitfor "^M"
waitfor "ECHG "
transmit "yes^M"
waitfor "ITEM "
transmit "ncos 5^M"
waitfor "ITEM "
transmit "^M"
endproc

I need for the script to continually run. I now enter ALT . to restart the script. How do I enter that in the transmit statement ? transmit "ALT." doesn't work. Is there some other way?
TIA
 
You could put your code inside a loop.

Here's an example from aspects help file:

Code:
proc main
   integer Loops = 0             ; Integer used to count loops.

   while (Loops++) < 3           ; Loop and increment variable three
   endwhile                      ; times.
   usermsg "I looped %d times!" Loops
endproc
 
I added my script as shown:

;Recorded script. Editing may be required.
proc main
integer Loops = 0 ; Integer used to count loops.
transmit "^M"
waitfor "TYPE: "
transmit "^M"
waitfor "TN "
waitfor "^M"
waitfor "ECHG "
transmit "yes^M"
waitfor "ITEM "
transmit "ncos 6^M"
waitfor "ITEM "
transmit "^M"
while (Loops++) < 3 ; Loop and increment variable three
endwhile ; times.
usermsg "I looped %d times!" Loops
endproc

It did not rerun the script, but it did say it looped 4 times !!
 
KODR, when you mentioned loops, I got out the Aspect script language book and researched loops. Got it going!!
Thanks for pointing me in the loop direction!!
 
Look around this site, there is a lot of stuff geared towards phone systems. There also forums for various Nortel equipment on this site also.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top