Move Mouse Action Icon

Move Mouse Action

Declaration

<AMMOUSEMOVE MOVEX="number" MOVEY="number" RELATIVE="yes/no">

See Also

Send Keystrokes

Description

Moves the mouse pointer to the specified pixel coordinates.

Practical Usage

Because it uses pixel coordinates instead of control locations. The mouse action is only recommended for use if an application cannot be automated using the Send Keystrokes Action <AMSENDKEYS> or other, more reliable Interactivity actions. This would usually only occur if the external application that is being automated did not support standard Windows conventions such as accelerator keys or hot-keys. The reason for this, is that mouse movements and clicks are dependant on window positioning and screen resolution, whereas the Send Keystrokes Action <AMSENDKEYS> is not affected by this variable.

Parameters

General Tab

Move Position
X Pos
Number, Optional - Default (none the mouse will not move)
MARKUP: MOVEX="255"

Specifies the X pixel coordinate that the mouse pointer should be moved to.

Y Pos
Number, Optional - Default (none the mouse will not move)
MARKUP: MOVEY="100"

Specifies the Y pixel coordinate that the mouse pointer should be moved to.

Relative
yes/no, Optional - Default - YES
MARKUP: RELATIVE="NO"

When enabled, specifies that the coordinates specified are relative to the foreground (top) window as opposed to the screen. Usually this will insulate mouse movements from changes in Window position and size from session to session.

Notes

Standard Error Handling Options
This action also includes the standard "Error Causes" and "On Error" failure handling options/tabs

More on Error Handling Options

Variables and Expressions
All text fields allow the use of expressions by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, a popup expression builder is available in all these fields by pressing F2.
More on variables...
More on expressions...
More on the expression builder...

Example

<AMMOUSEMOVE MOVEX="614" MOVEY="492">