View Single Post
Old 07-31-2020, 04:08 PM
bgagnon bgagnon is offline
VanDyke Technical Support
Join Date: Oct 2008
Posts: 4,482
Hi David,

I am not sure how it's used in your script, but what about if you "wait for" just ## characters using VBScript's Left() function? Is the command unique enough that would work?

If you want to calculate an exact amount of columns, somewhere in your script where you expect to be at a prompt, add this line:
    nCmdCols = g_objNewTab.Screen.Columns - g_objNewTab.Screen.CurrentColumn
That should calculate the exact columns left over for the command. Then, if you need to store it in a different variable:
    strFirstLine = Left(strCommand, nCmdCols)
Then you would "wait for" strFirstLine.

VanDyke Software
Technical Support
(505) 332-5730
Reply With Quote