VanDyke Software Forums

VanDyke Software Forums (https://forums.vandyke.com/index.php)
-   Scripting (https://forums.vandyke.com/forumdisplay.php?f=14)
-   -   Example: Get Tab By Name (https://forums.vandyke.com/showthread.php?t=13287)

jdev 10-12-2018 01:23 PM

Example: Get Tab By Name
 
2 Attachment(s)
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; both a python example as well as a vbscript example are provided.

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).'
There is a GetTabByNameCI() that will allow case-insensitive matching.

Enjoy!
--Jake


All times are GMT -6. The time now is 11:19 AM.