Legal Notices | Privacy Policy
Site Map | Refund Policy
Copyright © 1995 -
VanDyke Software, Inc.
All rights reserved.
|
How do I send control characters
in a script?
To send or embed control characters in strings in
JScript/Javascript convert them to octal values with a prepended
'\' character for example:
// send ^C, (decimal 3)
crt.screen.Send("\003")
// send ^D, (decimal 4)
crt.screen.Send("\004")
// send ^M, (decimal 13)
crt.screen.Send("\015")
In VBScript use the Chr() function with the decimal value of the
character you want to send:
' Send ^C
crt.screen.Send Chr(3)
' Send ^D
crt.screen.Send Chr(4)
' Send ^M
crt.screen.Send Chr(13)
You can use the VBScript '&' operator to concatenate strings
with the Chr() function, for example:
crt.screen.Send "hello" & Chr(10) &
"goodbye"
| Four Fast Ways to Learn More... |
| 1. Read or download one of our secure solutions white papers. |
2. Download
a free
30-day evaluation copy of our products. |
3. Let us help
define the right Secure Shell solution for your company. |
4. Subscribe to our monthly newsletter for tips, solutions ideas, and product news. |
|
| |
VShell, SecureCRT, SecureFX, Entunnel, CRT,
and AbsoluteFTP are trademarks or registered trademarks of VanDyke Software, Inc. in the United States and/or other countries. All other trademarks or registered trademarks
are the property of their respective owners. |