Translate page

VBS_Search (Method)


IScreen::VBS_Search

Search the screen either forward or backwards for a text string.

 

Function VBS_Search(row As Variant, column As Variant, text As String, direction As Long) As Long
 


Parameters

NoNameTypeOptionalDefaultDescription
1

row

Variant

No-

row in the screen where search is to begin

2

column

Variant

No

-

column in the screen where search is to begin

3

text

String

No

-

Text to search for

4

direction

Long

No

-

Direction of search

Return Code

Description

JGS_OK

The function was successful

JGS_NOTCONNECTED

Your application is not currently connected to any valid session

JGS_PARAMETERERROR

Missing or invalid parameter

JGS_POSITIONERROR

Invalid screen position

JGS_SYSERROR

The function failed due to a system error

JGS_NOFIELD

Search text was not found

Remarks

If the return value is JGS_OK the row and column arguments will contain the position where the first character of the search text was found. The search will continue past the end or beginning of the screen until the whole screen was searched. This means that it is possible to find the search text before the starting position even if the search direction was FORWARD.

Sample Code


 

Dim myText as String
Dim row as Variant
Dim column as Variant
Dim result as Long
row = 1
column = 1
myText = "Jolly Giant Software"
result = screen.VBS_Search(row, column, myText)

 


Back to IScreen members


QWS3270 Automation copyright © Jolly Giant Software Inc. All rights reserved.

 

Â