Reads data from the host until a line-feed character is encountered.
expression.ReadLine3( _
ByVal As Integer, _
ByVal As ReadOption, _
ByRef 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).
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