diff --git a/lib/HoldRepeat.ahk b/lib/HoldRepeat.ahk index dbd5b5e..2f19589 100644 --- a/lib/HoldRepeat.ahk +++ b/lib/HoldRepeat.ahk @@ -70,22 +70,18 @@ HoldOrRepeat(Primary, Secondary) { } ; Press Target button extremely rapidly while Hold button is held down -TurboOn(Target,Hold:=Target) { +Turbo(Target,Hold:=Target) { global _TurboOn If (_TurboOn.Has(Target "_" Hold) and _TurboOn[Target "_" Hold]) { return } else { _TurboOn[Target "_" Hold]:=1 - While _TurboOn[Target "_" Hold] { + While GetKeyState(Hold,"P") { Send "{Blind}{" Target " down}" Sleep 10 Send "{Blind}{" Target " up}" Sleep 10 } + _TurboOn[Target "_" Hold]:=0 } -} - -TurboOff(Target,Hold:=Target) { - global _TurboOn - _TurboOn[Target "_" Hold]:=0 } \ No newline at end of file diff --git a/lib/Prelude.ahk b/lib/Prelude.ahk index 29f48c6..382f6da 100644 --- a/lib/Prelude.ahk +++ b/lib/Prelude.ahk @@ -20,4 +20,7 @@ SetWorkingDir A_ScriptDir ; Ensures a consistent starting directory. A_MenuMaskKey := "vkFF" ; If script is already running, just override it with the new version instead of asking -#SingleInstance force \ No newline at end of file +#SingleInstance force + +; Send Mode +SendMode Event \ No newline at end of file diff --git a/src/Deep Rock Galactic.ahk b/src/Deep Rock Galactic.ahk index 794ef12..b7f1cab 100644 --- a/src/Deep Rock Galactic.ahk +++ b/src/Deep Rock Galactic.ahk @@ -31,6 +31,10 @@ RemoveTooltip() { ; Hotkeys ; +; +; Full Auto +; + ; Keep track of what is equipped ~*1:: global EquipState:=1 ~*2:: global EquipState:=2 @@ -45,10 +49,13 @@ RemoveTooltip() { ; Do full auto when caps lock is on for enabled weapons #HotIf (GetKeyState("CapsLock","T") and FullAutoEnabled[EquipState]) -*LButton::TurboOn("LButton") -*LButton UP::TurboOff("LButton") +*LButton::Turbo("LButton") #HotIf +; +; Other +; + ; Alt + E holds E *!e UP::Hold("e",["w","a","s","d","Space","LButton","RButton"]) @@ -62,5 +69,4 @@ RemoveTooltip() { *LShift UP::Hold("LShift",,["w"]) ; Hold space rapidly jumps -*Space::TurboOn("Space") -*Space UP::TurboOff("Space") +*Space::Turbo("Space")