Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-12-2018, 01:23 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,099
Post Example: 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; 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
Attached Files
File Type: txt GetTabByName.py.txt (2.9 KB, 2748 views)
File Type: txt GetTabByName.vbs.txt (2.7 KB, 2432 views)
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Closed Thread

Tags
example script , python , vbscript

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 03:05 AM.