Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Search the specified field for a text string.

Function Search(cursor As CursorPos, text As String) As Long

Parameters

NoNameTypeOptionalDefaultDescription
1cursorCursorPosNo-

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.


  • No labels