Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Screen Object / ReadChars2 Method
The number of characters to read. If zero is specified, an empty string is returned.
The time (in seconds) to wait for the specified number of characters.
Example
In This Topic
    ReadChars2 Method
    In This Topic
    Reads a specified number of characters from the host.
    Syntax
    expression.ReadChars2( _
       ByVal count As Integer, _
       ByVal timeout As Integer _
    ) As String
    where expression is a variable that represents a Screen Object

    Parameters

    count
    The number of characters to read. If zero is specified, an empty string is returned.
    timeout
    The time (in seconds) to wait for the specified number of characters.

    Return Value

    A string that contains the requested number of characters or all of the characters received prior to a timeout.
    Example
    This example reads the first 1000 characters received from the host.
    Sub ReadSetNumberOfChars()
     
        Dim charactersReceived As String
        
        'Send a command
        ThisScreen.SendKeys "ls"
        ThisScreen.SendControlKey ControlKeyCode_Return
        
        'Read the first 1000 characters
        charactersReceived = ThisScreen.ReadChars2(1000, 1)
        
        Debug.Print charactersReceived
        
    End Sub
    See Also