View Single Post
  #166  
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:
Code:
    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:
Code:
    strFirstLine = Left(strCommand, nCmdCols)
Then you would "wait for" strFirstLine.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote