Waits for the specified string to be found in the host data stream (VT/6530
only).
- Parameters
-
- Str
- The string to search for in the host data stream.
- Timeout
- The number of seconds to wait before timing out. A value of 0 will wait
forever.
- Returns
- True if the string was found before the timeout; False if not found.
- Remarks
- This is the preferred method to wait when automating a VT session. The search string
can be escape sequences, such as "[24;1H", not just strings that appear on the
screen.
- Example
-
Set bzhao = CreateObject("BZWhll.WhllObj")
bzhao.WaitForString( "login: ", 30 )
bzhao.SendKey "guest<Enter>"
bzhao.WaitForString( "Password: ", 30 )
bzhao.SendKey "guestpw<Enter>"