App control commands are commands that emulate user interaction with a desktop application. I.e. they select controls, press buttons, type text or click the mouse.
Performs a mouse left click at the provided co-ordinates.
The mouse cursor is returned to the starting point after performing the click so that the user is not inconvenienced by it.
When entering constant values these are in pixels and are relative to the top left of the application window. i.e. they are not screen absolute.
The special values
HorizontalMiddle
VerticalMiddle
automatically refer to the centre position of the selected window.
Refer to the syntax diagrams for the valid combinations and positioning of the parameters.
Parameter Name | Description |
---|---|
xPixels | The number of pixels from the left edge of the application window. |
| Automatically determined pixel number for the horizontal centre of the application window. |
yPixels | The number of pixels from the top edge of the application window. |
| Automatically determined pixel number for the vertical centre of the application window. |
/*
Select a control then left click its centre point.
Unselect the control then click the main window's centre point.
*/
// Control "x" gets focus
SelectControl "x"
// Click Middle of control "x"
LeftClick HorizontalMiddle VerticalMiddle
// Deselect the control "x"
UnSelect
// The control still has focus
// Click middle of window that is "x"'s parent
LeftClick HorizontalMiddle VerticalMiddle
// The parent window now has focus
Using a left click is an alternative way of bringing a window into focus.
If you try to use this method make sure you do not inadvertantly click on a control.