VanDyke Software

Scripting Examples


Get Tab By Name

SecureCRT's script API doesn't yet have a native GetTabByName() method.

However, you can get a reference to each existing tab by index, and then iterate over all existing tabs looking for the desired tab by name/caption/title (Caption).

These example scripts show you how. A Python example as well as a VBScript example are provided below.

Each example has a function GetTabByName() that takes as an argument a string that is considered case-sensitive ("My Tab Name" is not the same as "my tab name" because of case). The example also includes a GetTabByNameCI() function showing how to achieve case-insensitive matching.

Example Scripts (2.9 KB)
GetTabByName.vbs.txt (2.7 KB)

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.