Lua:mouse event
Jump to navigation
Jump to search
| <> Function function mouse_event(Flags, [dx, dy, Data, ExtraInfo]) : void |
Calls the Windows API mouse_event directly for advanced mouse control.
See the MSDN documentation for detailed information about the parameters.
Function Parameters
| Parameter | Type | Description |
|---|---|---|
| Flags | Integer | Specifies various aspects of mouse motion and button clicks. |
| dx | Integer (optional) | The absolute x-coordinate or relative motion in pixels. |
| dy | Integer (optional) | The absolute y-coordinate or relative motion in pixels. |
| Data | Integer (optional) | Additional data, e.g., amount of wheel movement. |
| ExtraInfo | Integer (optional) | Application-defined extra information. |
Returns
void — This function does not return a value.
Example
setMousePos(659, 573) mouse_event(MOUSEEVENTF_LEFTDOWN) sleep(20) mouse_event(MOUSEEVENTF_LEFTUP)
See also
| Lua |
| Script Engine |
Related Functions
| getMousePos |
| setMousePos |
| isKeyPressed |
| keyDown |
| keyUp |
| doKeyPress |
| mouse_event |
| setGlobalKeyPollInterval |
| setGlobalDelayBetweenHotkeyActivation |