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

WAITFOR command

Status
Not open for further replies.

flipProg76

Programmer
Aug 16, 2007
5
I have recorded a script and it seems the recorder put some fluff in the generated .was file.

Examples:
1) waitfor " ^[[24;46H"
2) waitfor "3 ^[[19;63H"
3) waitfor "Scroll up/down, <ENTER> to select, <F11> when done^[[?25l"

Also for the transmit command
4) transmit "^[[23~"

What is the meaning of the characters after the "^" in the above commands.

I have a feeling its just fluff.....

thanks in advance.
 
Those are escape sequences sent by the remote system, for color, positioning, or other terminal settings. You can usually replace that with the actual text that appears on screen, but sometimes what you see is not what Procomm woudl see, due to these escape sequences being embedded. If everything works OK with the recorded script, I would leave them as-is for now.

 
well that's part of the problem...
the client has stated their scripts (which ALL have similar "fluff") run slow.

They can manually perform the actions of the script in seconds....but when they run the script it can take much, much longer.

I was thinking that the exact WAITFOR command was not found and got timed out before continuing the execution.
 
each waitfor "<something>" will wait 15 Secs by default. With several unsuccesful waits, things can slow right down. You could try waitfor "<something>" FOREVER . But if the wait is not succesful.. it will permanently halt the script. Or lower the wait times.. waitfor "<something>" 5 (5 secs wait)
Incidentally, if you want/need to check for the success of the waitfor with...

waitfor "<something>" 5
if success
usermsg "We saw `"<something>`" within 5 secs"
else
usermsg "We waited 5 secs and didn't see `"<something>`""
endif


With regards to "^" the caret...
A common one is transmit "^M"
M's the 13th letter of the Alphabet, so '^M' translates to ASCII13. (Carriage return)
A full explanation of Caret Translation can be found in the Procomm Help Files.



 
There is a possibility that is correct. I would try replacing the escape sequences with some of the actual strings as they appear on screen and see if that alleviates the problem.

 
thanks for the help. i removed the "fluff" and now its working as intended.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top