View Single Post
Old 10-09-2014, 03:26 PM
rtb rtb is offline
VanDyke Technical Support
Join Date: Aug 2008
Posts: 4,306
Hi kgaudineer,
I am thinking it may just be easier to create a new script.
It that is the route you want to go, you are welcome to do so. For me, modifying the existing script would be easier.
My dilemma is there are several hundred of these switches I need to hit and it looks like this script has a hard time with a dynamic prompts.
The script is not designed to handle prompts dynamically, but you can build that in. There is no reason that you can't call the WaitForScreenContentsToStopChanging() function again to determine what a new prompt would be.

If you manually type the command all at once, what output do you see?

Please post the output exactly as it would appear. If you need to redact sensitive data, replace each redacted character with an "x".
Just out of curiosity is there any documentation on the commands used in Secure CRT.
The SecureCRT API is documented in the help file under the Scripting / Script Objects Reference chapter. VBScript is documented by Microsoft, and page one of the scripting manual provides a reference to Microsoft's documentation that does still work.

The scripting manual is a good place to start if you are learning.

The variable objNewTab is an object. The internet has a wealth of information on learning object oriented programming concepts.
objNewTab.Screen.CurrentColumn -1
Here is a breakdown of this statement:
  • objNewTab gets a reference to the currently active tab in SecureCRT. This lets us use the script to interact with the tab using the SecureCRT API.
  • Screen is the SecureCRT API object to use.
  • CurrentColumn is a property that is a member of the Screen object. When it is called, it returns the current column of the cursor in the terminal window which is an integer.
  • Using -1 is simply a mathematical operation. If CurrentColumn returned a 9, the result would be 8.

VanDyke Software
Technical Support

Last edited by rtb; 10-09-2014 at 03:32 PM.
Reply With Quote