Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.IbmHosts Library / Attachmate.Reflection.Objects.Emulation.IbmHosts Library / IbmScreen Object / WaitForHostSettle Method
Wait timeout value (milliseconds).
Settle time (milliseconds).
Example
In This Topic
    WaitForHostSettle Method (IbmScreen)
    In This Topic
    Waits for host screen data to settle.
    Syntax
    expression.WaitForHostSettle( _
       ByVal timeout As Integer, _
       ByVal settleTime As Integer _
    ) As ReturnCode
    where expression is a variable that represents a IbmScreen Object

    Parameters

    timeout
    Wait timeout value (milliseconds).
    settleTime
    Settle time (milliseconds).

    Return Value

    One of the following ReturnCode enum values.

    Member Description
    Cancelled Cancelled.
    Error Error.
    PermissionRequired Permission is required.
    Success Success.
    Timeout Timeout condition.
    Truncated The text is truncated.

    Remarks

    This waits for the screen to be quiet without changes for the time duration specified by settleTime. The wait timeout value should be greater than settleTime.

    If you know the text or initial cursor location of the screen you are navigating to, using methods such as WaitForCursor1 or WaitForText1 is more efficient than waiting for a period of time

    For more about using the WaitForHostSettle method, see:

    Navigating Through Open Systems Sessions

    Enter Data from an Excel Spreadsheet

    Copy Data Between Terminal Sessions

    Get Screen Data With an Excel Macro

    Get Data From a Spreadsheet

     

    Example
    This sample uses the WaitForHostSettle method to navigate to a the Edit - Entry Panel Screen on the Reflection IBM3270 demo and writes some text on the last screen. To run this sample in the IBM3270 demo, start a session with the host adress set to demo:ibm3270.sim. Then run the macro from the login screen.
    Sub NavigateWithWaitForHostSettle()
        'Declare application, terminal, and view object variables:
        Dim terminal As Attachmate_Reflection_Objects_Emulation_IbmHosts.IbmTerminal
     
        Set terminal = ThisIbmTerminal
      
        'Get a handle to the Screen object and navigate to the screen we
        'want to enter the data on
        Set screen = terminal.screen
      
        'Navigate to a screen
        rcode = screen.WaitForHostSettle(2000, 1000)
        rcode = screen.SendControlKey(ControlKeyCode_Transmit)
          
        rcode = screen.WaitForHostSettle(2000, 1000)
        rcode = screen.SendKeys("ISPF")
        rcode = screen.SendControlKey(ControlKeyCode_Transmit)
      
        rcode = screen.WaitForHostSettle(2000, 1000)
        rcode = screen.SendKeys("2")
        rcode = screen.SendControlKey(ControlKeyCode_Transmit)
      
        rcode = screen.WaitForHostSettle(2000, 1000)
       
        'Put some text into a field on the last screen
        rcode = screen.PutText2("Finished", 5, 18)
       
    End Sub
    See Also