SUPPORT > TIPS
Send us a question or comment

 

Send us your tip idea

Tab Scripting With SecureCRT® 5.2 and Later

Note: This tip is for use with SecureCRT for Windows®.

SecureCRT 5.2 and later supports scripting functions to control multiple tabbed sessions from a script. Tabs functions allow scripts to connect Secure Shell command and SFTP tabs, clone tabs, activate tabs, and close tabs. Examples of common application are opening multiple tabbed sessions in a specific order, and prompting for a command and sending it to multiple tabbed sessions.

Below are sample scripts written in VBScript demonstrating each of the tab functions.

ActivateTab.vbs Opens a specified session as a tab and brings it to the foreground
CloneTab.vbs Takes a session window and creates a duplicate (clone) window
CloseTab.vbs Opens a specified session as a tab and then disconnects the session
ConnectSFTPTab.vbs Connects to a defined session and then opens an SFTP tab window for that session
DisconnectTab.vbs Opens a session in a tab and then disconnects it
SendToAll.vbs Takes a command and sends it to all open tabs

The above scripts use the following tab-specific script functions:

crt.Session.ConnectInTab()
crt.GetTabCount()
crt.GetTab()
objTab.Activate()
objTab.Clone()
objTab.Close()
objTab.ConnectSftp()
objTab.Index()
objTab.Caption()
objTab.Session.Disconnect()
objTab.Session.Connected()
objTab.Screen.Send()

You can find more information about the Tab object in the SecureCRT Help files under ActiveX Scripting / Script Objects Reference / Tab Object.

To learn more about scripting for SecureCRT, visit our Scripting Examples web page.

Was this information helpful?
Yes No
Thank you!
Send your comments and questions to VanDyke Software Support,
or join the discussion in the VanDyke Software Forums.
Can't find the answer you're looking for?
Ask VanDyke Software Support directly
and we will get back to you as soon as possible.
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 What's New page for tips, solution ideas, and product news.