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

ctrx_set_waiting_time

Example Citrix Synchronization Functions

Sets the waiting time for all Citrix ICA wait functions.

int ctrx_set_waiting_time( long waitTime );

waitTime The time to wait in seconds

ctrx_set_waiting_time changes the waiting time of the Citrix Synchronization Functions from the default 60 seconds.

Note: This function does not change the waiting time of the Connection Functions that connect and disconnect from the Citrix server.

Return Values

Citrix ICA Return Values

Parameterization

No parameterization is available for this function.

Example

In the following example, a ctrx_set_waiting_time has been inserted before launching the Web browser, because the default waiting time of 60 seconds wasn't long enough for the browser to appear. Note that the value of 180 also changes the waiting time of all other Citrix Synchronization Functions.

Actions () {

     /* set_waiting_time for all sync functions. Used here for ctrx_set_window */
     ctrx_set_waiting_time(180);

     ctrx_connect_server("ludens", "test", "test", "ludens", CTRX_LAST);
     ctrx_wait_for_event("LOGON");

     /* Launch the web browser by clicking on the desktop IE icon */
     ctrx_mouse_double_click(34, 325, LEFT_BUTTON, 0, NULL, CTRX_LAST);

     /* ctrx_set_window now has a 2 minute waiting time instead of 1 */
     ctrx_set_window(
               "Mercury Interactive Corporation at mercuryinteractive.com", CTRX_LAST);

     /* Exit the web browser by clicking on top left Exit check box */
     ctrx_mouse_click(573, 61, LEFT_BUTTON, 0,
               "Mercury Interactive Corporation at mercuryinteractive.com", CTRX_LAST);

     lr_think_time(12);
     ctrx_disconnect_server("ludens", CTRX_LAST);

     return 0;
}