WaitForHostSettle Method (Screen)
Waits for the host screen data to settle (that is, there is no incoming data for the specified settle time).
expression.WaitForHostSettle( _
ByVal As Integer _
) As ReturnCode
where
expression is a variable that represents a
Screen Object
Parameters
- settleTime
- The settle time (milliseconds).
Return Value
One of the following ReturnCode enumeration values.
Member |
Description |
Cancelled |
Cancelled. |
Error |
Error. |
PermissionRequired |
Permission is required. |
Success |
Success. |
Timeout |
Timeout condition. |
Truncated |
The text is truncated. |
This sample uses the WaitForHostSettle method to navigate by waiting a set time for the host to respond and the screen to settle. If you know which strings your host returns, consider using the waitForStrings method, which is more efficient than using a set time to wait for the host to respond.
To run this sample, create a VT session with the Host IP address set as demo:Unix and log in with any credentials. Then run the sample.
Sub NavigateWithWaitForHostSettle()
Dim returnValue As Integer
ThisScreen.SendKeys "demodata"
ThisScreen.SendControlKey ControlKeyCode_Return
returnValue = ThisScreen.WaitForHostSettle(2000)
ThisScreen.SendKeys "exit"
ThisScreen.SendControlKey ControlKeyCode_Return
returnValue = ThisScreen.WaitForHostSettle(2000)
ThisScreen.SendKeys "ls"
ThisScreen.SendControlKey ControlKeyCode_Return
End Sub