VanDyke Software Forums

Go Back   VanDyke Software Forums > General
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 04-26-2012, 11:18 PM
miteethor miteethor is offline
Registered User
 
Join Date: Apr 2012
Posts: 4
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
Reply With Quote
  #2  
Old 04-27-2012, 06:32 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 3,265
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 Request
In 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=10289
Rather 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.html
It 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?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 04-30-2012, 07:49 AM
miteethor miteethor is offline
Registered User
 
Join Date: Apr 2012
Posts: 4
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
Reply With Quote
  #4  
Old 09-18-2012, 02:01 PM
Maureen's Avatar
Maureen Maureen is offline
VanDyke Product Director
 
Join Date: Feb 2004
Location: Albuquerque, NM
Posts: 1,297
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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 -7. The time now is 12:15 AM.


copyright 1995-2014 VanDyke Software, Inc.