Pandab2002
IS-IT--Management
I am trying to write a script that captures a tnb dump from a nortel pbx. Here it is...simple right?
proc main
caprure on
transmit "ld 20^M"
waitfor "REQ: "
transmit "prt^M"
waitfor "TYPE: "
transmit "500^M"
waitfor "TN "
transmit "^M"
waitfor "CDEN "
transmit "^M"
waitfor "CUST "
transmit "^M"
waitfor "TEN "
transmit "^M"
waitfor "DATE "
transmit "^M"
waitfor "PAGE "
transmit "^M"
waitfor "DES "
transmit "^M"
waitfor "NACT "
transmit "end^M"
capture off
endproc
Well, the problem is the "waitfor "TEN " line. Only about half of my PBX's have that prompt. If I run the script below it hangs at that point in a PBX without that prompt. What I'd like to do is, after the transmit "500^M" prompt, I would like to put something in there that tells the script to just keep sending "^M" until waitfor "DES ", and then send one more "^M". I tried using if not waitfor "DES " and a few other things, but I haven't had any success. Any assistance would be greatly appreciated.
Paul...
proc main
caprure on
transmit "ld 20^M"
waitfor "REQ: "
transmit "prt^M"
waitfor "TYPE: "
transmit "500^M"
waitfor "TN "
transmit "^M"
waitfor "CDEN "
transmit "^M"
waitfor "CUST "
transmit "^M"
waitfor "TEN "
transmit "^M"
waitfor "DATE "
transmit "^M"
waitfor "PAGE "
transmit "^M"
waitfor "DES "
transmit "^M"
waitfor "NACT "
transmit "end^M"
capture off
endproc
Well, the problem is the "waitfor "TEN " line. Only about half of my PBX's have that prompt. If I run the script below it hangs at that point in a PBX without that prompt. What I'd like to do is, after the transmit "500^M" prompt, I would like to put something in there that tells the script to just keep sending "^M" until waitfor "DES ", and then send one more "^M". I tried using if not waitfor "DES " and a few other things, but I haven't had any success. Any assistance would be greatly appreciated.
Paul...