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.
Value | Description |
---|---|
LBUTTON | Left mouse button |
MBUTTON | Center mouse button |
RBUTTON | Right mouse button |
nKeyState (input)
Specify key status, which must be one of the following values.
Value | Description |
---|---|
SHIFT_ON | The Shift key is on. |
ALT_ON | The Alt key is on. |
CTRL_ON | The Ctrl key is on. |
SHIFT_OFF | The Shift key is off. |
ALT_OFF | The Alt key is off. |
CTRL_OFF | The 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 number | Error code |
---|---|
8 | ERROR_NOT_ENOUGH_MEMORY |
14 | ERROR_OUTOFMEMORY |
87 | ERROR_INVALID_PARAMETER |
112 | ERROR_DISK_FULL |