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

Problem with ^[ Caret translation

Status
Not open for further replies.

wdurant

Programmer
Aug 31, 2005
3
PR
Hi! I have a problem with a script that it is suppose to send the following key "^m ^[^[[12~" which is ENTER ESC F2. This is an xterm emulation. The thing is that it works with some computers but when i copy the script on others does not work. It sends the ENTER key but not the others. Also it works manually but not with the script.Can anyone help on this?

Thanks
Wilson
 
Wilson, this is due to the ~ character being interpreted as a pause by Procomm. Assuming you are using a transmit statement, you can add the RAW keyword at the end so that Procomm does not process the pause character, like this:

transmit "^m ^[^[[12~" RAW

 
I did but still not working. It writes the strings instead of sending the ESC F2 keys on the screen.

Wilson
 
Try getting rid of the space between the ^M and the rest of the string. You might also need to get rid of the first ^[ (this is Escape) since it looks like there may be an extra Escape in that string.


 
Bingo it works!! Thanks a lot, Bob.

Wilson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top