概述
示例脚本
连点一个坐标
- 会抢占鼠标
F8
启动或停止
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 |
F8:: Toggle1 := !Toggle1 If (Toggle1) { SetTimer, Clicker1, 100 ToolTip, 单点已启动 ;SetTimer, RemoveToolTip, -2000 } Else { SetTimer, Clicker1, Off ToolTip, 单点已停止 ;SetTimer, RemoveToolTip, -2000 } Return ; 使用 ControlClick 在目标窗口后台点击指定位置 Clicker1: CoordMode, Mouse, Screen MouseMove, 420, 1105 DllCall("mouse_event", "UInt", 0x0002, "UInt", 0, "UInt", 0, "UInt", 0, "UInt", 0) DllCall("mouse_event", "UInt", 0x0004, "UInt", 0, "UInt", 0, "UInt", 0, "UInt", 0) Return ; 隐藏 ToolTip ;RemoveToolTip: ; ToolTip ;Return ; 按 Esc 键退出脚本 ;Esc::ExitApp |
按顺序连点两个坐标
F8
启动的是两个坐标的循环按顺序连点
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 |
F8:: Toggle1 := !Toggle1 If (Toggle1) { SetTimer, Clicker1, 100 ToolTip, 点击1已启动 ;SetTimer, RemoveToolTip, -2000 } Else { SetTimer, Clicker1, Off ToolTip, 点击1已停止 ;SetTimer, RemoveToolTip, -2000 } Return F9:: Toggle2 := !Toggle2 If (Toggle2) { SetTimer, Clicker2, 100 ToolTip, 点击2已启动 } Else { SetTimer, Clicker2, Off ToolTip, 点击2已停止 } Return ; 使用 ControlClick 在目标窗口后台点击指定位置 Clicker1: CoordMode, Mouse, Screen MouseMove, 420, 955 DllCall("mouse_event", "UInt", 0x0002, "UInt", 0, "UInt", 0, "UInt", 0, "UInt", 0) DllCall("mouse_event", "UInt", 0x0004, "UInt", 0, "UInt", 0, "UInt", 0, "UInt", 0) Sleep, 50 MouseMove, 420, 1005 DllCall("mouse_event", "UInt", 0x0002, "UInt", 0, "UInt", 0, "UInt", 0, "UInt", 0) DllCall("mouse_event", "UInt", 0x0004, "UInt", 0, "UInt", 0, "UInt", 0, "UInt", 0) Return Clicker2: x := 420 y := 1005 DllCall("mouse_event", "UInt", 0x0002, "UInt", 0, "UInt", 0, "UInt", 0, "UInt", 0) DllCall("mouse_event", "UInt", 0x0004, "UInt", 0, "UInt", 0, "UInt", 0, "UInt", 0) Return ; 隐藏 ToolTip ;RemoveToolTip: ; ToolTip ;Return ; 按 Esc 键退出脚本 ;Esc::ExitApp |
本文为原创文章,版权归Aet所有,欢迎分享本文,转载请保留出处!
你可能也喜欢
- ♥ SVN:管理工程10/14
- ♥ 哲学体系概述07/15
- ♥ C++_友元、联合体、内联、static、指针、深浅拷贝06/21
- ♥ 表_约束-外键10/27
- ♥ Windows物理内存虚拟内存03/28
- ♥ Reading 2021 《隐忍的老虎-司马懿》05/05