phonejack99
Technical User
I'm just starting to use scripts on a regular basis and have noticed an issue on some of my Nortel PBX's. Below is a snip of a script that I've been using. My issue is that sometimes the PBX will respond with the "MARP" prompt and sometimes it will not. When it does the script below works like a charm of course when it does not the script bombs.
My question is -- is there a way to have a conditional wait for or an if this (MARP prompt) then that type of command that I can incorporate into the script?
Thanks in advance for your help!!!
waitfor "REQ:"
transmit "CHG^M"
waitfor "TYPE: "
transmit "3903 ^M"
waitfor "TN "
transmit "34 7^M"
waitfor "ECHG "
transmit "YES^M"
waitfor "ITEM "
transmit "KEY 2 MCR 8470 D^M"
waitfor "MARP"
transmit "^M"
waitfor "CPND "
transmit "^M"
waitfor "VMB "
transmit "^M"
waitfor "KEY "
transmit "3 MCR 8470 D^M"
waitfor "MARP"
transmit "^M"
waitfor "CPND "
transmit "^M"
waitfor "VMB "
transmit "^M"
waitfor "KEY "
transmit "^M"
waitfor "ITEM "
transmit "^M"
waitfor "REQ:"
transmit "****^M"
My question is -- is there a way to have a conditional wait for or an if this (MARP prompt) then that type of command that I can incorporate into the script?
Thanks in advance for your help!!!
waitfor "REQ:"
transmit "CHG^M"
waitfor "TYPE: "
transmit "3903 ^M"
waitfor "TN "
transmit "34 7^M"
waitfor "ECHG "
transmit "YES^M"
waitfor "ITEM "
transmit "KEY 2 MCR 8470 D^M"
waitfor "MARP"
transmit "^M"
waitfor "CPND "
transmit "^M"
waitfor "VMB "
transmit "^M"
waitfor "KEY "
transmit "3 MCR 8470 D^M"
waitfor "MARP"
transmit "^M"
waitfor "CPND "
transmit "^M"
waitfor "VMB "
transmit "^M"
waitfor "KEY "
transmit "^M"
waitfor "ITEM "
transmit "^M"
waitfor "REQ:"
transmit "****^M"