ScreenUPG
findString Method
Example 



The text to search for.
The row in which to begin searching.
The column in which to begin searching.
The row where the string was found. If the string is not found, the value is set to zero.
The column where the string was found. If the string is not found, the value is set to zero.
Searches the presentation space for the specified text string starting from the specified start position. If found, it returns true and the start position of the string.
Syntax
'Declaration
 
Public Function findString( _ 
   ByVal inText As String, _ 
   ByVal inStartRow As Integer, _ 
   ByVal inStartColumn As Integer, _ 
   ByVal outRow As MutableInt, _ 
   ByVal outColumn As MutableInt _ 
) As Boolean
'Usage
 
Dim instance As ScreenUPG 
Dim inText As String 
Dim inStartRow As Integer 
Dim inStartColumn As Integer 
Dim outRow As MutableInt 
Dim outColumn As MutableInt 
Dim value As Boolean 
  
value = instance.findString(inText, inStartRow, inStartColumn, outRow, outColumn)
public bool findString( 
   string inText,
   int inStartRow,
   int inStartColumn,
   MutableInt outRow,
   MutableInt outColumn 
)
public: 
bool findString( 
   String^ inText,
   int inStartRow,
   int inStartColumn,
   MutableInt^ outRow,
   MutableInt^ outColumn 
) 

Parameters

inText
The text to search for.
inStartRow
The row in which to begin searching.
inStartColumn
The column in which to begin searching.
outRow
The row where the string was found. If the string is not found, the value is set to zero.
outColumn
The column where the string was found. If the string is not found, the value is set to zero.

Return Value

true or false. If the string is found, the value is set to true. Otherwise, it is set to false.
Example
string inText = "PASSWORD";
int inStartRow = 1;
int inStartCol = 1;
MutableInt outRow = new MutableInt();
MutableInt outCol = new MutableInt();
            
// Find the string
bool found = screen.findString(inText, inStartRow, inStartCol, outRow, outCol);
Dim inText As Integer
Dim inStartRow As Integer
Dim inStartCol As Integer
Dim outRow As New Mutable.MutableInt
Dim outColumn As New Mutable.MutableInt
Dim found As Boolean
            
inText = "PASSWORD"
inStartRow = 1
inStartCol = 1
            
'Find the string
found = screen.findString(inText, inStartRow, inStartCol, outRow, outCol)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ScreenUPG Class
ScreenUPG Members
findStringEx Method