Waits for the user to press keys while the focus is in
the session window.
- Parameters
- TimeoutVal
- Optional: The number
of seconds to wait. If omitted, the default is to wait forever. The
maximum finite wait time is 65535 seconds, approximately 18 hours.
- KeyStr
- Optional: A string of
characters representing the keys to wait for. If omitted, the default
is any key.
- Returns
- An empty string if KeyStr was omitted, or if
the timeout occurred, or the keys pressed if a match was found.
- Example
Set bzhao = CreateObject("BZWhll.WhllObj")
bzhao.Connect
bzhao.Focus
result = bzhao.WaitForKeys( 10000, "logon<Enter>"
If ( result <> "" ) Then
MsgBox "User typed " & result
Else
MsgBox "Ten seconds timeout occurred." )
End If