Sub Test()
Dim osCurrentTerminal As Terminal
Set osCurrentTerminal = ThisFrame.SelectedView.control
Dim osCurrentScreen As screen
Set osCurrentScreen = osCurrentTerminal.screen
Dim FoundPoint As ScreenPoint
With osCurrentScreen
.SearchText("LookingForThisWord", 1, 1, FindOptions_Forward) = FoundPoint
.DisplayText ("hello")
End With
End Sub
REGARDING THE ABOVE CODE:
I get a 438 run time error. Can someone please tell me how to find the word using .SearchText? I have been reading the Reflection VBA Guide very closely and I think I am missing something basic (I am not a coder by training).
Attachmate.Reflection.Objects.Emulation.OpenSystems Library > Screen Object is the section I am looking at in the guide.
it says :
object.SearchText( _ ByVal text As String, _ ByVal startRow As Long, _ ByVal startColumn As Long, _ ByVal findOption As FindOptions _ ) As _ScreenPoint
Parameters textText string to search for. startRowStarting row for the search. The valid range is 1 through the number of rows. startColumnStarting column for the search. The valid range is 1 through the number of columns. findOptionSpecifies the search direction. Return Value
The coordinate of the located text or null, if the text is not found.
I am trying to know the coordinates of the found word so I can know other things on that row (it's a numerical list of words, and the number is the final information i will be sending to the host)
I appreciate greatly any help
Aucun commentaire:
Enregistrer un commentaire