Example: ctrx_win_exist

In the following example, ctrx_win_exist checks if the web browser has launched. If it doesn't appear within the specified waiting_time , ctrx_mouse_double_click launches the web browser from the desktop.

/* If browser has not launched in nine seconds, click the desktop IE icon */
if (!ctrx_win_exist("Welcome to MSN.com - Microsoft Internet Explorer", 9))
ctrx_mouse_double_click(34, 325, LEFT_BUTTON, 0, NULL);

ctrx_set_window("Welcome to MSN.com - Microsoft Internet Explorer");

/* 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 Internet Explorer");