#1
|
|||
|
|||
Can a Button be toggled to send to all tabs?
I love the chat bar with the send to all tabs function. It's awesome.
I love buttons. Can buttons be setup to act like the chat bar? Maybe a right-click function on the bar to allow send to all tabs on the button? I have to check a lot of routers when doing maintenance and the commands are extremely repetitive - I could do a lot of checking with just a couple of clicks across a lot of devices at the same time. Conversely, if that isn't available, is there a way to trigger this via a script? Either something that populates the chat bar or that could send a text command to all tabs? Thanks |
#2
|
|||
|
|||
Hi miteethor,
Thanks for the question. Currently, it is not possible to use a button to send a command to all tabs. I have created a feature request to add this behavior in our SecureCRT enhancement database. I also created a feature request to add a Chat Window object to the SecureCRT scripting API. Should a future release of SecureCRT have either feature added, we will post to this forum thread. If you would like to be notified directly, please complete and submit the form at the following location: Submit Feature RequestIn the meantime, it is possible to send a command to all open tabs using a script. There is an example written in VBScript that illustrates iterating over all open tabs in the forum thread at the following location: http://forums.vandyke.com/showthread.php?t=10289Rather than obtaining information about the tab and popping a message box, you could interact with each tab as you iterate over the tabs by sending commands and ensuring that they are completed. If you are not familiar with the SecureCRT scripting API, you can find information on sending data to and waiting for data from remote machine in chapters 5 and 4 respectively in the script manual at the following location: http://www.vandyke.com/support/tips/...ing/index.htmlIt is also important to note that when interacting with a remote machine, you should use the Synchronous property. The importance of using this property is covered on page 39 of the scripting manual. Is this information helpful? |
#3
|
|||
|
|||
Actually, you have been very helpful. I have thrown together a quick and dirty solution to my problem based on some of the examples and it seems to be working great so far. All you have to do is call this file and put your command in "quotes" in the arguments section of the button, and it will send to all connected tabs.
To use this code, save in a .vbs file. Create a new button: Function: Run Script Run Script: path to the .vbs file Label: put what you want the button to read, such as sh run all Arguments: "sh run" or something similar in quotes Click the button! ![]() Code:
strCmd = crt.Arguments(0) crt.Screen.Synchronous = True For nIndex = 1 To crt.GetTabCount Set objCurrentTab = crt.GetTab(nIndex) bConnected = objCurrentTab.Session.Connected if bConnected then objCurrentTab.Screen.Send strCmd & vbcr End If Next |
#4
|
||||
|
||||
The ability to send a button action to all tabbed or tiled sessions has been added to a pre-beta version of SecureCRT. If you would be interested in trying it, please send e-mail to me at Maureen.Jett@vandyke.com.
Maureen |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|