Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-12-2018, 07:20 AM
fplante fplante is offline
Registered User
 
Join Date: May 2017
Posts: 1
Send data to multiple session in same time

Hello.

I made a script to open multiple SSH connections in different tabs.

Once opened, I made another script to send different commands in same time to every connections. The only way I found was with the tab number.

Set objCurrentTab = crt.GetTab (3)
objCurrentTab.Screen.Send "COMMAND" & Chr (13)


I am looking for a solution to be sent data with the name of tab (or connection) not with the number of tab to be sure i send the data to the right equipement.

exemple: Set objCurrentTab = crt.GetTab ("TAB NAME")

Does anyone have an idea how?
Reply With Quote
  #2  
Old 10-12-2018, 01:31 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 845
Quote:
Originally Posted by fplante View Post
I am looking for a solution to be sent data with the name of tab... not with the number of tab to be sure i send the data to the right equipement.

exemple: Set objCurrentTab = crt.GetTab ("TAB NAME")
SecureCRT doesn't yet have a native script API for GetTabByName(). I've added a feature request on your behalf.

However, you can write a wrapper function that iterates over all existing tabs and compares each tab's caption with a specified string value (name).

In the script examples "sticky", you'll see an entry there named "Get Tab By Name". The "Get Tab By Name" example will show you how to accomplish your objective.

Does this get you closer to where you'd like to be?

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: http://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: http://www.vandyke.com/support
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 08:23 PM.