Search the specified field for a text string.
Function Search(cursor As CursorPos, text As String) As Long
Parameters
No | Name | Type | Optional | Default | Description |
---|---|---|---|---|---|
1 | cursor | CursorPos | No | - | Position in the screen where the search begins |
2 | text | String | No | - | String to search for |
Return Code | Description | ||||
JGS_OK | The search string was found. The 'cursor' parameter contains the position in the screen where the search string begins. | ||||
JGS_NOTCONNECTED | Your application is not connected to a valid session | ||||
JGS_PARAMETERERROR | Missing or invalid parameter | ||||
JGS_SYSERROR | The function failed due to a system error | ||||
JGS_POSITIONERROR | The specified screen position is invalid | ||||
JGS_NOFIELD | The screen is not formatted |
Sample Code
Dim myPos as CursorPos
Dim myText as String
Dim result as Long
myPos.row = 18
myPos.column = 45
myText = "Jolly Giant Software"
result = field.Search(myPos, myText)
If result = JGS_OK then
... ' myPos contains the starting position of the text
Else ...
QWS3270 Automation copyright © Jolly Giant Software Inc. All rights reserved.