SecureCRT Scripting FAQ

SecureCRT® supports several scripting languages so you can automate tasks and processes. On the Windows platform, ActiveX scripting languages include VBScript, JScript, and Perlscript. Python is supported on Windows, macOS, and Linux. A script recorder helps you build your keystrokes into a VBScipt or Python script.

More information on scripting in SecureCRT can be found on the Windows Scripting Examples page, the Python Scripting Examples page, and the VanDyke Software online Scripting Essentials guide.

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"

Three Fast Ways to Learn More…

  1. Read or download one of our secure solutions white papers.
  2. Download a free evaluation copy of our products.
  3. Let us help define the right Secure Shell solution for your company.

VanDyke Software uses cookies to give you the best online experience. Before continuing to use this site, please confirm that you agree to our use of cookies. Please see our Cookie Usage for details.