ctrx_mouse_double_click
Example | Mouse Functions |
Emulates a double mouse click on a Citrix client sent to a Citrix server.
int ctrx_mouse_double_click( long x_pos, long y_pos, long mouse_button, long key_modifier, char *window_name, [CONTINUE_ON_ERROR,] CTRX_LAST );
int ctrx_obj_mouse_double_click( const char *obj_desc, long x_pos, long y_pos, long mouse_button, long key_modifier, char *window_name, [CONTINUE_ON_ERROR,] CTRX_LAST );
obj_desc | A description of the object recorded if the agent is installed on the server. |
x_pos | The horizontal distance of the mouse click from the edge of the ICA client window. |
y_pos | The vertical distance of the mouse click from the edge of the ICA client window. |
mouse_button | Mouse Key Values. |
key_modifier | Key Modifier Values that were pressed together with the mouse_button. |
window_name | The title of the window in which the double mouse click occurs. NULL if not within an active window. |
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_mouse_double_click waits for window window_name to appear, then executes a double mouse click.
If the agent is installed on the server, ctrx_obj_mouse_double_click is recorded. The only difference is the additional object description.
If the double mouse click occurs on the desktop (i.e., not within a window), then x_pos and y_pos will hold values relative to the edge of the screen.
The wildcard character (*) can be used in window_name.
Return Values
Parameterization
No parameterization is available for this function.
Example
In the following example, after connecting to the Citrix server ludens, ctrx_mouse_double_click executes a double-click with the left mouse button on Microsoft's Edge browser, to start that application.
Actions () {
ctrx_connect_server("ludens", "test", "test", "ludens", CTRX_LAST);
ctrx_wait_for_event("LOGON");
/* Launch the web browser by clicking on desktop Edge icon */
ctrx_mouse_double_click(34, 325, LEFT_BUTTON, 0, NULL, CTRX_LAST);
lr_think_time(13);
ctrx_set_window("Welcome to MSN.com - Microsoft Edge", CTRX_LAST);
/* Exit the web browser by clicking on top left Exit check box */
ctrx_mouse_click(573, 61, LEFT_BUTTON, 0,
"Welcome to MSN.com - Microsoft Edge", CTRX_LAST);
lr_think_time(12);
ctrx_disconnect_server("ludens", CTRX_LAST);
return 0;
}