ClickMouse

Windows management function.

The ClickMouse function simulates a mouse button click in the specified window.

Usage

ClickMouse should be used only if an object within the application cannot be clicked using Click function or SendKeys function (for sending accelerator keys or hot-keys). ClickMouse function is pixel related and dependant on screen resolution.

Syntax

ClickMouse(<Button>,<Action>,<x>,<y>[,absolute])

Parameters

<Button>, mouse button used, the keywords are Left or Right (or Middle, but this keyword is not recorded in Recording mode).

<Action> : Down, Up or Double for a double click.

<x>,<y>, coordinates of the mouse click in pixels

absolute : optional keyword ; the <x>,<y> coordinates are not against the upper-left corner of the window but against the upper-left hand of the screen (this option is added automatically when Recording in Low level mode).

Remarks

The mouse action is executed in the window specified by the last statement UseWindow.

When a single click is recorded, two statements are generated :
ClickMouse(left,down,X,Y)
ClickMouse(left,up,X,Y)

If no window were specified previously by a UseWindow statement, an error message is displayed and all the scripts are stopped (unless #IgnoreErrors=1)

Examples

 

ClickMouse(Right, Down, 100, 200)

ClickMouse(Left, Double, var_x, var_y)