ScreenUPG
waitForString Method
Example 



The text string to wait for.
The row in which to look for the string. If the row is set to zero, the wait is satisfied if the string appears in the column specified.
The column in which to look for the string. If the column is set to zero, the wait is satisfied if the string appears in the row specified.
The number of milliseconds to wait for the wait condition to be satisfied before timing out.
Waits for the specified text to appear at the specified position for a specified period of time.
Syntax
'Declaration
 
Public Sub waitForString( _ 
   ByVal inText As String, _ 
   ByVal inRow As Integer, _ 
   ByVal inColumn As Integer, _ 
   ByVal wtTime As Integer _ 
) 
'Usage
 
Dim instance As ScreenUPG 
Dim inText As String 
Dim inRow As Integer 
Dim inColumn As Integer 
Dim wtTime As Integer 
  
instance.waitForString(inText, inRow, inColumn, wtTime)
public void waitForString( 
   string inText,
   int inRow,
   int inColumn,
   int wtTime 
)
public: 
void waitForString( 
   String^ inText,
   int inRow,
   int inColumn,
   int wtTime 
) 

Parameters

inText
The text string to wait for.
inRow
The row in which to look for the string. If the row is set to zero, the wait is satisfied if the string appears in the column specified.
inColumn
The column in which to look for the string. If the column is set to zero, the wait is satisfied if the string appears in the row specified.
wtTime
The number of milliseconds to wait for the wait condition to be satisfied before timing out.
Exceptions
ExceptionDescription
TimedOutException Thrown if waitHostQuiet times out.
Remarks
If the row and column are zero, it waits for text to appear anywhere in the presentation space. Otherwise, it times out after wtTime (specified in milliseconds).
Example
try
{
	// Waits for the specified text to appear anywhere on the screen
	string inText = "LOGON";
	int inRow = 0;
	int inColumn = 0;
	int wTime = 3000;
            
	screen.waitForString(inText, inRow, inColumn, wtTime);
}
catch (TimedOutException toe)
{
	Console.Write("TimedOutException\n");
}
Dim inText As String
Dim inRow As Integer
Dim inColumn As Integer
Dim wTime As Integer
            
'Text to wait for anywhere
inText = "LOGON"
inRow = 0
inColumn = 0
wTime = 3000
            
'Waits for the specified text to appear anywhere on the screen
screen.waitForString inText, inRow, inColumn, wTime
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
waitForCursor Method
waitHostQuiet Method