Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Screen Object / ReadUntil2 Method
Specifies one or more terminator characters. Any one of these characters can terminate the read operation.
The time (in seconds) to wait for a terminator character. The range of valid values is 0 through 99.
Example
In This Topic
    ReadUntil2 Method
    In This Topic
    Reads data from the host until one of the specified terminator characters is received. The terminator character is not included in the returned string.
    Syntax
    expression.ReadUntil2( _
       ByVal terminatorChars As String, _
       ByVal timeout As Integer _
    ) As String
    where expression is a variable that represents a Screen Object

    Parameters

    terminatorChars
    Specifies one or more terminator characters. Any one of these characters can terminate the read operation.
    timeout
    The time (in seconds) to wait for a terminator character. The range of valid values is 0 through 99.

    Return Value

    The string of data that was read from the host.
    Example
    This example reads data from the host until a terminating character is received.
    Sub ReadUntilTerminatingCharacter()
     
        Dim text As String
        
        'Send a command to the host
        ThisScreen.SendKeys ("1")
        ThisScreen.SendControlKey ControlKeyCode_Enter
        
        'Reads text received from the host until either 'o' or 'n' is received
        text = ThisScreen.ReadUntil2("on", 2)
        
        Debug.Print text
           
     
    End Sub
    See Also