Forum

Can I insert a paus...
 
Notifications
Clear all

Can I insert a pause in the keymapping string

0 Posts
2 Users
0 Reactions
97 Views
(@drussell)
Active Member
Joined: 20 years ago
Posts: 7
Topic starter  

The keymapping string that I use for non-Nexus Cisco switches fails for Nexus switches due to a suspected timing issue. Is there a way to insert a pause in the string to wait for the remote device to be ready to accept the second part of my string?


   
ReplyQuote
(@bpence)
Member Admin
Joined: 8 months ago
Posts: 1374
 

Yes, but requires a bit of scripting.

You *can* insert a script as your keymapping text, and the script will run in response to your keypress. The only thing you have to do special is insert the keyword 'VBSCRIPT' at the top of the script, then the remainder of the body is a VBScript script. See the following script for an example. Insert the entire contents (except for the ---------) as the keymapping text.

------------------------
VBSCRIPT
Sub Main
SendText "Step 1"
WaitForTimeout "Some Text",1000
SendText "Step 2"
end Sub
---------------------------

SendText will send a particular text string

WaitForTimeout will wait for the response, but only for a certain number of miliseconds. If you don't really expect a response, but just want to wait for the specified amount of time, the text here is unimportant. Just make sure you set the delay time to what you want.

Hope this helps!


   
ReplyQuote
Share: