CitrixVirtualUserScript WaitForText Method (String, Int32, Int32, Int32, Int32, String, IList String , IList String , String, String, )C# API
Use OCR to wait for some text to appear in an area of the screen.

Namespace: Facilita.Fc.Citrix
Assembly: fcCitrix (in fcCitrix.dll) Version: 9.5.8.37
Syntax

public Rectangle WaitForText(
	string searchText,
	int x,
	int y,
	int width,
	int height,
	string language = null,
	IList<string> preferredWords = null,
	IList<string> validWords = null,
	string validCharacters = null,
	string validPattern = null,
	Rotation textRotation = Rotation.NoRotation
)

Parameters

searchText
Type: System String
the text to find
x
Type: System Int32
The x coordinate of the top left corner of the rectangle to read
y
Type: System Int32
The y coordinate of the top left corner of the rectangle to read
width
Type: System Int32
The width of the rectangle to read
height
Type: System Int32
The height of the rectangle to read
language (Optional)
Type: System String
The language the text is in (optional)
preferredWords (Optional)
Type: System.Collections.Generic IList String 
Specifies words that should be returned if found. However, if these are not found then other words will be returned instead.
validWords (Optional)
Type: System.Collections.Generic IList String 
Specifies the words that may be returned.
validCharacters (Optional)
Type: System String
The set of characters that may be returned
validPattern (Optional)
Type: System String
A regular expression value. Only characters or words that match the pattern specified will be returned.
textRotation (Optional)
Type: Rotation
Specifies how the text has been rotated

Return Value

A Rectangle specifying the area of the screen where the text was found
Exceptions

ExceptionCondition
TimeoutExceptionThrown if the text cannot be found before the timeout period elapses
Remarks

This method will search for the text every DefaultPollFrequency milliseconds until the text can be found, or until the search times out.
See Also