SUPPORT > TIPS
Send us a question or comment

 

Send us your tip idea

Tab Scripting With SecureCRT® 5.2 and Later

SecureCRT 5.2 and later supports working with tabs in scripts through functions that allow scripts to connect tabs, connect SFTP tabs, clone tabs, activate tabs, and close tabs.

Tab script functions allow users 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 sessions in tabs 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.

Tell us what you think. Did you find this tip useful? Do you have a question you'd like us to answer? Send your comments and questions to VanDyke Software Support.

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.