ctrx_sync_on_text_ex
Example | Citrix Synchronization Functions |
Waits until specified text is displayed in the specified area.
int ctrx_sync_on_text_ex( long xpos, long ypos, long width, long height, const char *value, const char *window_name, [CONTINUE_ON_ERROR,] CTRX_LAST );
xpos | The horizontal distance in pixels of the search rectangle from the left border of the ICA client window. |
ypos | The vertical distance in pixels of the search rectangle from the upper border of the ICA client window. |
width | The width of the search rectangle in pixels. |
height | The height of the search rectangle in pixels. |
value | The text to for which to wait. |
window_name | The window title. The asterisk wildcard character (*) can be used in window_name. |
CONTINUE_ON_ERROR | A constant, entered as shown without quotes. Overrides the error behavior runtime setting for this step so that script behaves as though the runtime setting was Continue on error. |
CTRX_LAST | A marker that indicates the end of the argument list. |
ctrx_sync_on_text_ex is a synchronization function that checks if a specified string is found in a specified rectangle, before continuing.
- Note:
- This function is available only if the Citrix agent is installed. For details, see Citrix agent overview in the VuGen Help Center (select the relevant version).
- The Citrix agent supports text-trapping functions (ctrx_sync_on_text, ctrx_sync_on_text_ex, and ctrx_get_text) only on Windows 8.1 and Windows Server 2012 R2.
When ctrx_sync_on_text_ex is recorded, the textEvent argument is set by the logic of the recording engine. Do not edit it.
ctrx_sync_on_text_ex can be inserted in a script after recording from the script tree view.
If you wish to enter the function manually, run the script once using ctrx_get_text to find the exact string. Then, comment out the ctrx_get_text call and enter the string as the value argument in the ctrx_sync_on_text_ex call.
You can enable VuGen to record the ctrx_sync_on_text_ex function automatically before each mouse click and double click. To enable the function to be recorded automatically, in VuGen, open Recording Options > Citrix > Code Generation and enable the setting Automatically generate text synchronization calls.
Return Values
Parameterization
No parameterization is available for this function.
Example
In this example, ctrx_sync_on_text_ex causes script execution to pause until the text "OK" appears at the location of the command button.
ctrx_sync_on_text_ex(410, 350, 180, 80, "OK", "NULL=snapshot67", CTRX_LAST ); ctrx_obj_mouse_click("<class=Button text=OK>", 421, 368, LEFT_BUTTON, 0, "NULL=snapshot67", CTRX_LAST );