1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
//! Mouse automation instructions
//!
//! Provides mouse instructions for automating mouse operations:
//! - `click`: Click at position (or current position)
//! - `dbclick`: Double-click at position
//! - `move`: Move to absolute position
//! - `moverel`: Move relatively from current position
//! - `scrollup`: Scroll wheel up
//! - `scrolldown`: Scroll wheel down
//! - `press`: Press and hold left button
//! - `release`: Release left button
//!
//! # Coordinate System
//!
//! All coordinates are in absolute screen space.
//!
//! # Instructions
//!
//! ## `click` - Click at position
//!
//! Performs a complete mouse click (press + release).
//!
//! **Syntax:** `click [x] [y] [delay_ms]`
//!
//! **Examples:**
//! ```text
//! click 100 200 # Click at (100, 200)
//! click # Click at current position
//! click 100 200 50 # Click at (100, 200) with 50ms delay
//! ```
//!
//! ---
//!
//! ## `dbclick` - Double-click at position
//!
//! Performs a double-click (two rapid clicks).
//!
//! **Syntax:** `dbclick [x] [y] [delay_ms]`
//!
//! **Examples:**
//! ```text
//! dbclick 100 200 # Double-click at (100, 200)
//! dbclick # Double-click at current position
//! dbclick 100 200 30 # Double-click at (100, 200) with 30ms delay
//! ```
//!
//! ---
//!
//! ## `move` - Move to absolute position
//!
//! **Syntax:** `move <x> <y>`
//!
//! **Examples:**
//! ```text
//! move 100 200 # Move to (100, 200)
//! ```
//!
//! ---
//!
//! ## `moverel` - Move relatively
//!
//! **Syntax:** `moverel <dx> <dy>`
//!
//! **Examples:**
//! ```text
//! moverel 10 -5 # Move 10px right, 5px up
//! ```
//!
//! ---
//!
//! ## `scrollup` - Scroll wheel up
//!
//! **Syntax:** `scrollup [x] [y] [times]`
//!
//! **Examples:**
//! ```text
//! scrollup # Scroll up 1 notch at current position
//! scrollup 3 # Scroll up 3 notches
//! scrollup 100 200 # Move to (100, 200) then scroll up
//! ```
//!
//! ---
//!
//! ## `scrolldown` - Scroll wheel down
//!
//! **Syntax:** `scrolldown [x] [y] [times]`
//!
//! **Examples:**
//! ```text
//! scrolldown 2 # Scroll down 2 notches
//! ```
//!
//! ---
//!
//! ## `press` - Press and hold left button
//!
//! **Syntax:** `press`
//!
//! **Examples:**
//! ```text
//! press # Press left button
//! ```
//!
//! ---
//!
//! ## `release` - Release left button
//!
//! **Syntax:** `release`
//!
//! **Examples:**
//! ```text
//! release # Release left button
//! ```
// Submodules - each instruction handler in its own file
// Re-export handlers for convenience
pub use ClickHandler;
pub use DbClickHandler;
pub use MoveHandler;
pub use MoveRelHandler;
pub use PressHandler;
pub use ReleaseHandler;
pub use ScrollDownHandler;
pub use ScrollUpHandler;