Mouse » History » Version 1
Per Amundsen, 10/24/2022 01:00 PM
| 1 | 1 | Per Amundsen | _Added in 4.3_ |
|---|---|---|---|
| 2 | |||
| 3 | */mouse <@window> <event> <mouse.x> <mouse.y> <mouse.key>* |
||
| 4 | |||
| 5 | Triggers a [[Scripting_Menus#Mouse-events|Mouse Event]] with the specified parameters. |
||
| 6 | |||
| 7 | *Parameters* |
||
| 8 | |||
| 9 | @window - The window to trigger the mouse event for. |
||
| 10 | event - The [[Scripting_Menus#Mouse-events|Mouse Event]] to trigger. |
||
| 11 | mouse.x - The [[$mouse]].x coordinates to trigger at. |
||
| 12 | mouse.y - The [[$mouse]].y coordinates to trigger at. |
||
| 13 | mouse.key - The [[$mouse]].key flag to trigger with. |
||
| 14 | |||
| 15 | *Events* |
||
| 16 | |||
| 17 | <pre> |
||
| 18 | None = 0 |
||
| 19 | Mouse = 1 |
||
| 20 | SIngleClick = 2 |
||
| 21 | MiddleClick = 3 |
||
| 22 | DoubleClick = 4 |
||
| 23 | DoubleMiddleclick = 5 |
||
| 24 | UpClick = 6 |
||
| 25 | UpMiddleClick = 7 |
||
| 26 | RightClick = 8 |
||
| 27 | DoubleRightClick = 9 |
||
| 28 | ListBoxClick = 10 |
||
| 29 | Leave = 11 |
||
| 30 | Drop = 12 |
||
| 31 | WheelUp = 13 |
||
| 32 | WheelDown = 14 |
||
| 33 | Resize = 15 |
||
| 34 | Minimize = 16 |
||
| 35 | Maximize = 17 |
||
| 36 | Restore = 18 |
||
| 37 | </pre> |
||
| 38 | |||
| 39 | *Example* |
||
| 40 | |||
| 41 | <pre> |
||
| 42 | ; Create a mouse event for '@window'. |
||
| 43 | menu @window { |
||
| 44 | mouse:{ |
||
| 45 | echo -ag mouse.x is $mouse.x mouse.y is $mouse.y mouse.key is $mouse.key |
||
| 46 | } |
||
| 47 | } |
||
| 48 | |||
| 49 | alias testmouse { |
||
| 50 | ; Create a custom window named '@window'. |
||
| 51 | /window @window |
||
| 52 | |||
| 53 | ; Call the mouse event for '@window'. |
||
| 54 | /mouse @window 1 42 42 0 |
||
| 55 | } |
||
| 56 | </pre> |