Citrix ICA Vuser Functions (CTRX) > Alphabetical List of Functions > ctrx_sync_on_text_ocr

ctrx_sync_on_text_ocr

Example: ctrx_sync_on_text Synchronization Functions

Waits until specified text is displayed in the specified rectangle, using optical character recognition (OCR).

int ctrx_sync_on_text_ocr( long xpos, long ypos, long width, long height, const char *value, const char *filename, [CONTINUE_ON_ERROR,] CTRX_LAST );
xpos The horizontal distance in pixels from the left border of the ICA client window.
ypos The vertical distance in pixels from the upper border of the ICA client window.
width Of rectangle in pixels.
height Of rectangle in pixels.
value The text to for which to wait.
filename The snapshot file. Do not edit this value.
CONTINUE_ON_ERROR A constant, entered as shown without quotes. Overrides the error behavior run-time setting for this step so that script behaves as though the run-time setting was Continue on error.
CTRX_LAST A marker that indicates the end of the argument list.

ctrx_sync_on_text_ocr is a synchronization function that waits for a specified string to appear in the specified rectangle before continuing. This function uses optical character recognition to identify the string.

The xpos, ypos are relative to the ICA client .

ctrx_sync_on_text_ocr function is not recorded. You can enter it manually in your scripts.

Return Values

Citrix ICA Return Values

Parameterization

No parameterization is available for this function.

Example

In this example, ctrx_sync_on_text_ocr causes script execution to pause until text "test" appears at the specified location in Notepad window.

ctrx_sync_on_text_ocr(304, 119, 30, 15, "test", "snapshot_109", CTRX_LAST);
ctrx_obj_mouse_click("<class=Notepad>", 310, 125, 
     LEFT_BUTTON, 0, "Untitled - Notepad=snapshot_110", 
	 CTRX_LAST);