AIT_MouseMoveTo

Description

Moves the mouse to specified coordinates.

Format

bool AIT_MouseMoveTo  (
 integer nX,             // X coordinate
 integer nY,             // Y coordinate
 integer nButton,        // Mouse button
 integer nKeyState       // Key status
);

Parameters

nX (input)

Specify the X coordinate of a position to which to move the mouse.

nY (input)

Specify the Y coordinate of a position to which to move the mouse.

nButton (input)

Specify a mouse button to be clicked during movement. You have to set one of the following values.

ValueDescription
LBUTTONLeft mouse button
MBUTTONCenter mouse button
RBUTTONRight mouse button

nKeyState (input)

Specify key status, which must be one of the following values.

ValueDescription
SHIFT_ONThe Shift key is on.
ALT_ONThe Alt key is on.
CTRL_ONThe Ctrl key is on.
SHIFT_OFFThe Shift key is off.
ALT_OFFThe Alt key is off.
CTRL_OFFThe Ctrl key is off.

Return values

The return value is true if the function was executed normally, and false if not. If the function has returned false, you can use AIT_GetLastError to acquire an extended error code. The following gives the error codes that AIT_GetLastError might return:

Extended error numberError code
8ERROR_NOT_ENOUGH_MEMORY
14ERROR_OUTOFMEMORY
87ERROR_INVALID_PARAMETER
112ERROR_DISK_FULL