SearchText3 Method (IbmScreen)
Searches the specified text, starting from the specified screen location and ending at the specified end screen location.
expression.SearchText3( _
ByVal As String, _
ByVal As Integer, _
ByVal startColumn As Integer, _
ByVal As Integer, _
ByVal endColumn As Integer, _
ByVal As FindOption _
) As ScreenPoint object
where
expression is a variable that represents a
IbmScreen Object
Parameters
- text
- The specified text string.
- startRow
- Start row.
- startColumn
- Start column.
- endRow
- End row.
- endColumn
- End column.
- 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 specific area of the screen.
Sub SearchForText()
Dim screenPosition As Attachmate_Reflection_Objects_Emulation_IbmHosts.ScreenPoint
Dim lowerCaseText As String
Dim upperCaseText As String
text = "PDF"
'look for uppercase text
Set screenPosition = ThisIbmScreen.SearchText3(text, 1, 1, 23, 52, FindOption_Forward)
If IsEmpty(screenPosition) Or (screenPosition Is Nothing) Then
MsgBox upperCaseText & " Not found"
Else
MsgBox upperCaseText & " found at row " & screenPosition.row & " and column " & screenPosition.column
End If
End Sub