Waits for the specified text to appear at the specified position for a specified period of time.


Namespace: ScreenUPG
Assembly: ScreenUPG (in ScreenUPG.dll)

Syntax

Visual Basic (Declaration)
Public Sub waitForString( _ 
   ByVal inText As String,  _ 
   ByVal inRow As Integer,  _ 
   ByVal inColumn As Integer,  _ 
   ByVal wtTime As Integer _ 
)
C#
public void waitForString(
   string inText,
   int inRow,
   int inColumn,
   int wtTime
)
C++
public:
 void waitForString(
   String inText,
   int inRow,
   int inColumn,
   int wtTime
) sealed 
J#
public void waitForString(
   string inText,
   int inRow,
   int inColumn,
   int wtTime
)
JScript
public  function waitForString(
   inText : String,
   inRow : int,
   inColumn : int,
   wtTime : int
)

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

Exception TypeCondition
T: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

[C#]

 Copy Code
            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");
            }
            
[VB]
 Copy Code
            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
            

See Also