wnd.click Method


click(button, x, y, shift, ctrl, alt);

Generates mouse events that move the mouse to the specified location and then click the specified button. Default values will click the left button in the center of the current window. The application is brought to the foreground if necessary. Methods which generate real mouse events should only be used when strictly necessary because they restrict the user from using the mouse or activating other applications. Another important thing to note is that mouse operations are asynchronous, meaning that Q1 will not wait until the click is processed before continuing the script. Any synchronization with the application under test will have to be done manually.

Parameters

button
Optional. What button to use for click. Default is consts.MB_LEFTBUTTON.
x, y
Optional. Window relative coordinates where the click should occur. Default values are (-1, -1) and they are replaced by Q1 with the center of the current window.
shift, ctrl, alt
Optional. Flags specifying which control keys to keep pressed while generating the click. By default no keys are pressed.

See also

wnd Overview | wnd.dblclick

 


© 2003 Lightweight Technologies. All rights reserved.