SecureCRT how to send control characters in the script?

Securecrt Mac Edition is an ideal tool for connecting operation, including Windows, UNIX and VMS's. It can be transmitted encrypted files by using the included VCP command-line program. Securecrt Mac Edition is a terminal emulator that supports SSH, simply put is the Windows software to log the UNIX or Linux server host.

SecureCRT for Mac (SSH terminal tool)

A friend asked, SecureCRT how to send control characters in the script? With a look!

To send or embedded control characters in the string JScript / Javascript are, convert them to with the prefix "\" octal value of the character, for example:

// send ^ C, (decimal. 3)
crt.screen.Send ( "\ 003")

// send ^ D, (decimals. 4)
crt.screen.Send ( "\ 004")

// send ^ M, (decimals ) 13)
crt.screen.Send ( "\ 015")

In VBScript, using Chr () function and the decimal value of the character to be sent:

'Send C ^ 
crt.screen.Send Chr (. 3)

' transmitted D ^ 
crt.screen.Send Chr (. 4)

'Send M ^ 
crt.screen.Send Chr (13 is)

You can use VBScript '&' character string and the operator Chr () function is connected, for example:

crt.screen.Send“hello”&Chr(10)&“goodbye”

Guess you like

Origin blog.csdn.net/a12121abc/article/details/93752169