Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.IbmHosts Library / Attachmate.Reflection.Objects.Emulation.IbmHosts Library / IbmScreen Object / GetTextEx Method
The first row from which to retrieve data.
The first column from which to retrieve data.
The last row from which to retrieve data.
The last column from which to retrieve data.
A GetTextArea Enumeration value that specifies whether string data is returned as a stream or block.
A GetTextWrap Enumeration value that specifies screen wrapping characteristics.
A GetTextAttr Enumeration value that specifies the field types to return.
A GetTextFlags Enumeration value that specifies formatting information.
Example
In This Topic
    GetTextEx Method
    In This Topic
    Gets the text from the specified screen area.
    Syntax
    expression.GetTextEx( _
       ByVal startRow As Integer, _
       ByVal startColumn As Integer, _
       ByVal endRow As Integer, _
       ByVal endColumn As Integer, _
       ByVal areaType As GetTextArea, _
       ByVal wrap As GetTextWrap, _
       ByVal attr As GetTextAttr, _
       ByVal flags As GetTextFlags _
    ) As String
    where expression is a variable that represents a IbmScreen Object

    Parameters

    startRow
    The first row from which to retrieve data.
    startColumn
    The first column from which to retrieve data.
    endRow
    The last row from which to retrieve data.
    endColumn
    The last column from which to retrieve data.
    areaType
    A GetTextArea Enumeration value that specifies whether string data is returned as a stream or block.
    wrap
    A GetTextWrap Enumeration value that specifies screen wrapping characteristics.
    attr
    A GetTextAttr Enumeration value that specifies the field types to return.
    flags
    A GetTextFlags Enumeration value that specifies formatting information.

    Return Value

    The text in the specifed area.
    Remarks

    The (startRow, startColumn, endRow, endColumn) 4-tuple allows data to be retrieved from one or more lines, as a continuous stream or as a block of characters.

    For more about using the GetTextEx method, see:

    Save Screens as Text

    Example
    This sample gets a screenshot of the current screen and prints it to the Immediate window. Before you run the sample, choose Immediate Window on the VBA Editor View menu.
    Sub GetScreen()
     
        Dim screenRows As Integer
        Dim screenColumns As Integer
        Dim screenShot As String
        screenRows = ThisIbmScreen.rows
        screenColumns = ThisIbmScreen.columns
       
        'Get all the text on the screen
        screenShot = ThisIbmScreen.GetTextEx(1, 1, screenRows, screenColumns, GetTextArea_Block, _
        GetTextWrap_Off, GetTextAttr_Any, GetTextFlags_CRLF)
        
        Debug.Print screenShot
        
    End Sub
    See Also