CitrixVirtualUserScript CheckForImage Method (String, Int32, Int32, Int32, Int32, Int32, Int32)C# API
Checks if an image has appeared in an expected position

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

public bool CheckForImage(
	string bitmapFile,
	int xPos,
	int yPos,
	int width,
	int height,
	int searchRadius,
	int timeout
)

Parameters

bitmapFile
Type: System String
The image to be found
xPos
Type: System Int32
the x coordinate of the top left hand corner of the search area
yPos
Type: System Int32
the y coordinate of the top left hand corner of the search area
width
Type: System Int32
the width of the search area
height
Type: System Int32
the height of the search area
searchRadius
Type: System Int32
increase the search area by searchRadius pixels in each direction
timeout
Type: System Int32
The total time in milliseconds to wait before timing out.

Return Value

Returns true if the image has appeared otherwise false.
Remarks

Checks for the appearance of an image in the given screen area or the full screen. Equivalent to WaitForImage(String, Int32, Int32, Int32, Int32, Int32) but returns true/false instead of raising a timeout exception.
Examples

// wait a maximum of 20 seconds for the image 100 pixels around the original location 
if (!CheckForImage(@"Paint\View Tab.bmp", 126, 26, 40, 12,100, 20000))
{
    WriteMessage("The view tab was not found");
}
See Also