View Single Post
Old 07-31-2020, 04:08 PM
dav-parker dav-parker is offline
Registered User
Join Date: Jul 2020
Posts: 6
Originally Posted by dav-parker View Post
For the most part, I can do most of what I need. But, I've run across a new issue. I'm sending several commands to modify ACLs on an ASA. The script gets stuck at:

g_objNewTab.Screen.WaitForString strCommand

It appears that the ACL command is long enough that it doesn't display the entire command back. It wraps. So basically, the script hangs and cannot proceed.

Any good thoughts as to how to work around this?

I came up with a solution. I added code to wait for the first 40 chars of the string before sending the next. Works like a charm.

For Each strCommand In vCommands
strCommandEcho = Left(strCommand, 40)
If strCommand = "" Then Exit For

' Send the command text to the remote
g_objNewTab.Screen.Send strCommand & vbcr

' Wait for the command to be echo'd back to us.
' g_objNewTab.Screen.WaitForString strCommand
g_objNewTab.Screen.WaitForString strCommandEcho
Reply With Quote