InfoConnect VBA Guide
Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Screen Object / ReadUntil3 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.
A ReadOption value.
The specific terminator character that terminated the read.
Example
In This Topic
    ReadUntil3 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.ReadUntil3( _
       ByVal terminatorChars As String, _
       ByVal timeout As Integer, _
       ByVal option As ReadOption, _
       ByRef whichEndChar As String _
    ) 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.
    option
    A ReadOption value.
    whichEndChar
    The specific terminator character that terminated the read.

    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 and returns the terminating character
    Sub ReadToTerminatingCharacter()
     
        Dim text As String
        
        Dim whichchar As String
        
        ThisScreen.SendKeys ("ls")
        ThisScreen.SendControlKey ControlKeyCode_Enter
        
        'Reads data from the host until one of the terminating characters (x,y, or z)is received
        text = ThisScreen.ReadUntil3("xyz", 2, ReadOption_NoTranslation, whichchar)
        
        'Print the text read and the terminating character
        Debug.Print text & ", " & whichchar
           
     
    End Sub
    See Also