SearchText2 Method (IbmScreen)
Searches the specified text, starting from the specified screen location for "searchRange" byte positions.
expression.SearchText2( _
ByVal As String, _
ByVal As Integer, _
ByVal startColumn As Integer, _
ByVal As Integer, _
ByVal As FindOption _
) As ScreenPoint object
where
expression is a variable that represents a
IbmScreen Object
Parameters
- text
- The text to be searched.
- startRow
- Screen row location.
- startColumn
- Screen column location.
- searchRange
- The number of byte positions to be searched.
- findOption
- A FindOption enumeration that specifies the search direction.
Return Value
A
ScreenPoint object object that contains the screen coordinate where the specified text begins, if found, or null if the text could not be found.
This sample searches for the "ATM" text string on a range of the screen that is defined by a starting location and a number of screen byte positions.
Sub SearchForTextinARange()
Dim screenPosition As Attachmate_Reflection_Objects_Emulation_IbmHosts.ScreenPoint
Set screenPosition = ThisIbmScreen.SearchText2("ATM", 1, 1, 50, FindOption_Forward)
If IsEmpty(screenPosition) Or (screenPosition Is Nothing) Then
MsgBox "Not found"
Else
MsgBox "found at row " & screenPosition.row & " and column " & screenPosition.column
End If
End Sub