#NoEnv
#SingleInstance Force
#Persistent
#KeyHistory 0
SetBatchLines, -1
ListLines, Off
SendMode Input
; 用户可配置参数
global fireDelay := 50 ; 开火延迟(毫秒),可根据需要调整
global toggleKey := "F1" ; 开关热键
global fireKey := "LButton" ; 开火键
; 随机延迟函数,增加防检测
RandomDelay(min, max) {
Random, rand, min, max
return rand
}
; 主开关状态
isActive := false
; 热键切换开关
Hotkey, %toggleKey%, ToggleMacro
; 宏开关函数
ToggleMacro:
isActive := !isActive
if (isActive) {
ToolTip, 加特林连点宏 [开启], 10, 10
SetTimer, AutoFire, % fireDelay
} else {
ToolTip
SetTimer, AutoFire, Off
}
return
; 自动开火函数
AutoFire:
if (GetKeyState(fireKey, "P")) {
; 随机化点击时机
Random, randDelay, -15, 15
Sleep, % fireDelay + randDelay
; 模拟点击
Send, {LButton down}
Sleep, RandomDelay(10, 30)
Send, {LButton up}
}
return
; 脚本退出清理
^!x::ExitApp ; Ctrl+Alt+X退出脚本
; 隐藏托盘图标
#NoTrayIcon
#SingleInstance Force
#Persistent
#KeyHistory 0
SetBatchLines, -1
ListLines, Off
SendMode Input
; 用户可配置参数
global fireDelay := 50 ; 开火延迟(毫秒),可根据需要调整
global toggleKey := "F1" ; 开关热键
global fireKey := "LButton" ; 开火键
; 随机延迟函数,增加防检测
RandomDelay(min, max) {
Random, rand, min, max
return rand
}
; 主开关状态
isActive := false
; 热键切换开关
Hotkey, %toggleKey%, ToggleMacro
; 宏开关函数
ToggleMacro:
isActive := !isActive
if (isActive) {
ToolTip, 加特林连点宏 [开启], 10, 10
SetTimer, AutoFire, % fireDelay
} else {
ToolTip
SetTimer, AutoFire, Off
}
return
; 自动开火函数
AutoFire:
if (GetKeyState(fireKey, "P")) {
; 随机化点击时机
Random, randDelay, -15, 15
Sleep, % fireDelay + randDelay
; 模拟点击
Send, {LButton down}
Sleep, RandomDelay(10, 30)
Send, {LButton up}
}
return
; 脚本退出清理
^!x::ExitApp ; Ctrl+Alt+X退出脚本
; 隐藏托盘图标
#NoTrayIcon