Open topic with navigation
|Example: ctrx_get_text_location||Information Retrieval Functions|
Searches for a text in a selected area and retrieves the text location.
int ctrx_get_text_location( LPCSTR window_name, long *xpos, long *ypos, long *width, long *height, LPSTR text, long bMatchWholeWordOnly, LPCSTR filename, [CONTINUE_ON_ERROR,] CTRX_LAST );
|window_name||The window title. NULL if not within an active window.|
|xpos, ypos||Input/output parameters that set the beginning of the search area and get the text location.|
|width, height||The extent of the search area that starts at xpos, ypos.|
|text||The string for which to search.|
|bMatchWholeWordOnly||A flag to indicate whether to search only for a whole word match only or not. The flag can be TRUE or FALSE. True = 1, False = 0.|
|filename||The snapshot filename or an empty string.|
|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_get_text_location searches for the specified text in the area specified by xpos, ypos, width, and height. If the string is found, after the function returns, xpos, and ypos are the location at which the text was found. If the string is not found, xpos, and ypos are zero.
This function is available only if the agent is installed on the Citrix server.
The search text is a single word. A search for a phrase including spaces will always fail.
The xpos, and ypos arguments are relative to the window. If the window name is NULL, they are relative to the ICA client.
The asterisk wildcard character (*) can be used in window_name.
The easiest way to use ctrx_get_text_location is to record a script, then use the snapshot to insert a ctrx_get_text call. xpos, ypos, width, height, and the snapshot filename can all be taken from the ctrx_get_text call and used in the ctrx_get_text_location call.
No parameterization is available for this function.