Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Screen Object / WaitForHostSettle2 Method
The settle time (in milliseconds).
wait timeout value (milliseconds). Value of 0 indicates wait indefinitely.
Example
WaitForHostSettle2 Method
Waits for host screen data to settle (that is, there is no incoming data for the specified settle time).
Syntax
expression.WaitForHostSettle2( _
   ByVal settleTime As Integer, _
   ByVal timeout As Integer _
) As ReturnCode
where expression is a variable that represents a Screen Object

Parameters

settleTime
The settle time (in milliseconds).
timeout
wait timeout value (milliseconds). Value of 0 indicates wait indefinitely.

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.

Remarks

The wait timeout value should be greater than settleTime. The keyboard is disabled.

If you know which strings your host returns, consider using the waitForStrings method. This method is more efficient than using a set time to wait for the host to respond.

Example

This sample uses the WaitForHostSettle2 method to navigate.

To run this sample in the Reflection demo, create a VT session with the host name set to "demo:unix" and log in with any credentials. Then run the macro after you log in.

Sub NavigateWithWaitForHostSettle2()
 
    Dim returnValue As Integer
    
    ThisScreen.SendKeys "demodata"
    ThisScreen.SendControlKey ControlKeyCode_Return
    
    returnValue = ThisScreen.WaitForHostSettle2(2000, 3000)
    ThisScreen.SendKeys "exit"
    ThisScreen.SendControlKey ControlKeyCode_Return
    
    returnValue = ThisScreen.WaitForHostSettle2(2000, 3000)
    ThisScreen.SendKeys "ls"
    ThisScreen.SendControlKey ControlKeyCode_Return
 
End Sub
See Also