Open topic with navigation
The following code snippet invokes ctrx_get_window_name to retrieve the name of the window currently in focus, and verifies, using strcmp(), that it is the required window. It then executes a mouse click within the window.
long xpos, ypos, width, height;
ctrx_mouse_double_click(41, 266, LEFT_BUTTON, 0, NULL);
if (!strcmp(window_name, "Welcome to MSN.com - Microsoft Internet Explorer"))
ctrx_get_window_position(window_name, &xpos, &ypos, &width, &height);
ctrx_mouse_click(xpos + 35, ypos +128, LEFT_BUTTON, 0, window_name);