Tip: SecureCRT scripting primer
Beside being an excellent SSH client, SecureCRT also has a few “hidden” features such as scripting.
Since SecureCRT supports ActiveX scripting engines, scripts can be written in VBScript, JScript or other compliant languages.
Many aspects of the application can be controlled by using scripts, including the user interface, printing, file transfers, dialog prompts and so on.
Here’s a script that sets the tab title to SERVER_IP:SERVER_PORT immediately after a connection is established.
How to use the script:
- Create a new empty text file
- You can name the file whatever you want, as long as the file extension is “.vbs”
- Copy and paste the code below inside the file
- Save and close
- Open the properties dialog for the session you want to test
Sub Main Dim mytab Set mytab = crt.getTab(crt.getTabCount) mytab.caption = mytab.Session.RemoteAddress+":"+CStr(mytab.Session.RemotePort) End Sub
For more information about scripting in SecureCRT, see the FAQ on Vandyke’s site and the documentation included with the program.
