public native simulateMousePressed(x as Int, y as Int, button as Int = 1, alt as Boolean = false, control as Boolean = false, shift as Boolean = false) as Void
Simulates a native mouse press routed through the window hit-testing pipeline.
This is intended for GUI validation and screenshot scripts. It uses the same coordinates and button numbering as MouseEvent: 1 for left, 2 for middle and 3 for right.
| Parameter | Description |
|---|---|
x | X coordinate in window client coordinates. |
y | Y coordinate in window client coordinates. |
button | Mouse button to simulate. |
win.simulateMousePressed(80, 220, 3) # right click