View Single Post
  #2  
Old 05-19-2017, 09:01 AM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 501
Hi hooknife,

crt.Screen.WaitForString "#" (no space) should cover both instances since it finds the # regardless of what is after it. Is that not the behavior you see?

Another option would be to create and array of values you would like to wait for and use crt.Screen.WaitForStrings.

Code:
#$language = "VBScript"
#$interface = "1.0"

crt.Screen.Synchronous = True

WaitFors = Array("Value1","Value2 ")

Sub Main

	crt.Screen.WaitForStrings(WaitFors)

	crt.Dialog.MessageBox("Found it!")

End Sub
* If your values contain substrings of each other there will be problems. If you add "#" and "# " the "# " will never be found, SecureCRT will match with the "#" before the " " is added.

Does this help?
__________________
Thanks,
--Eric

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

Last edited by ekoranyi; 05-19-2017 at 10:28 AM.
Reply With Quote