InfoConnect VBA Guide
Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Screen Object / ReadLine3 Method
The time (in seconds) to wait for a line-feed character. The range of valid values is 0 through 99.
A ReadOption value.
Returns true if a line-feed character was received, otherwise false.
Example
In This Topic
    ReadLine3 Method
    In This Topic
    Reads data from the host until a line-feed character is encountered.
    Syntax
    expression.ReadLine3( _
       ByVal timeout As Integer, _
       ByVal option As ReadOption, _
       ByRef sawEndOfLine As Boolean _
    ) As String
    where expression is a variable that represents a Screen Object

    Parameters

    timeout
    The time (in seconds) to wait for a line-feed character. The range of valid values is 0 through 99.
    option
    A ReadOption value.
    sawEndOfLine
    Returns true if a line-feed character was received, otherwise false.

    Return Value

    Line of data read from the host (excluding carriage return and line-feed characters).
    Example
    This example reads and prints all the lines from the host until no end of line character is found.
    Sub ReadDataFromHost()
     
        Const timeout = 1
        Dim line As String
        Dim sawEOL As Boolean
     
        With ThisScreen
            
            'Send a command
            .SendKeys "1"
            .SendControlKey ControlKeyCode_Return
        
            'read lines until no end of line character is found
            Do
                
                line = .ReadLine3(timeout, ReadOption_NoTranslation, sawEOL)
        
                'print each line to the immediate window
                Debug.Print line
        
     
            Loop While sawEOL
     
        End With
     
    End Sub
    See Also