Browse Source

update scripts for new library format

master
Mar Alegre 1 year ago
parent
commit
9f3b17dba0
  1. 9
      lib/HoldRepeat.ahk
  2. 8
      scripts/AutorunAutoclick.ahk
  3. 4
      scripts/Deep Rock Galactic.ahk
  4. 16
      scripts/Minecraft Bedrock Edition.ahk
  5. 4
      scripts/Stardew Valley.ahk
  6. 21
      scripts/Subnautica.ahk
  7. 12
      scripts/Valheim.ahk

9
lib/HoldRepeat.ahk

@ -74,7 +74,7 @@ Hold := _HoldRepeat_Handler.Bind(true)
Repeat := _HoldRepeat_Handler.Bind(false) Repeat := _HoldRepeat_Handler.Bind(false)
; Sets key to hold if single tap, or repeat if double tap ; Sets key to hold if single tap, or repeat if double tap
HoldOrRepeat(TargetKey, CancelKeys?, HoldKey?) { HoldOrRepeat(TargetKey, CancelKeys:=[]) {
global HoldRepeat_BlindMode global HoldRepeat_BlindMode
Send HoldRepeat_BlindMode "{" TargetKey " down}" Send HoldRepeat_BlindMode "{" TargetKey " down}"
@ -83,5 +83,10 @@ HoldOrRepeat(TargetKey, CancelKeys?, HoldKey?) {
} else { } else {
isHold := true isHold := true
} }
_HoldRepeat_Handler(isHold, TargetKey, CancelKeys, HoldKey)
if (CancelKeys.Length == 0) {
CancelKeys := [TargetKey]
}
_HoldRepeat_Handler(isHold, TargetKey, CancelKeys)
} }

8
scripts/AutorunAutoclick.ahk

@ -19,7 +19,7 @@
*!Space UP::HoldOrRepeat("Space") *!Space UP::HoldOrRepeat("Space")
; Autorun ; Autorun
*!w UP::Hold("w",["s"]) *!w UP::Hold("w",["w","s"])
*!s UP::Hold("s",["w"]) *!s UP::Hold("s",["w","s"])
*!a UP::Hold("a",["d","w","s"]) *!a UP::Hold("a",["a","d","w","s"])
*!d UP::Hold("d",["a","w","s"]) *!d UP::Hold("d",["d","a","w","s"])

4
scripts/Deep Rock Galactic.ahk

@ -54,7 +54,7 @@ RemoveTooltip() {
; Do full auto when caps lock is on for enabled weapons ; Do full auto when caps lock is on for enabled weapons
#HotIf (GetKeyState("CapsLock","T") and FullAutoEnabled[EquipState]) #HotIf (GetKeyState("CapsLock","T") and FullAutoEnabled[EquipState])
*LButton::Repeat("LButton",,"LButton") *LButton::Repeat("LButton")
; ;
; Distruptive macros ; Distruptive macros
@ -79,7 +79,7 @@ RemoveTooltip() {
#HotIf #HotIf
; Alt + E holds E ; Alt + E holds E
*!e UP::Hold("e",["w","a","s","d","Space","LButton","RButton"]) *!e UP::Hold("e",["e","w","a","s","d","Space","LButton","RButton"])
; Press shift to sprint, only toggles on ; Press shift to sprint, only toggles on
*LShift::{ *LShift::{

16
scripts/Minecraft Bedrock Edition.ahk

@ -40,20 +40,20 @@ return
; Hold/Autoclick mouse buttons ; Hold/Autoclick mouse buttons
; Holds if single click, autoclicks if double click ; Holds if single click, autoclicks if double click
vkFF & LButton UP::HoldOrRepeat("LButton",["RButton","MButton"]) vkFF & LButton UP::HoldOrRepeat("LButton",["LButton","RButton","MButton"])
vkFF & RButton UP::HoldOrRepeat("RButton",["LButton","MButton"]) vkFF & RButton UP::HoldOrRepeat("RButton",["RButton","LButton","MButton"])
; Autorun ; Autorun
vkFF & w UP::Hold("w",["s"]) vkFF & w UP::Hold("w",["w","s"])
vkFF & s UP::Hold("s",["w"]) vkFF & s UP::Hold("s",["w","s"])
vkFF & a UP::Hold("a",["d","w","s"]) vkFF & a UP::Hold("a",["a","d","w","s"])
vkFF & d UP::Hold("d",["a","w","s"]) vkFF & d UP::Hold("d",["d","a","w","s"])
; Hold crouch ; Hold crouch
vkFF & Shift UP::Hold("Shift",["Ctrl"]) vkFF & Shift UP::Hold("Shift",["Shift","Ctrl"])
; Autojump/auto-ascend ; Autojump/auto-ascend
vkFF & Space UP::Hold("Space",["Shift"]) vkFF & Space UP::Hold("Space",["Space","Shift"])
; Mouse button 4: auto-takeoff ; Mouse button 4: auto-takeoff
; Macro assumes you have your fireworks in the first hotbar slot ; Macro assumes you have your fireworks in the first hotbar slot

4
scripts/Stardew Valley.ahk

@ -26,5 +26,5 @@ WrapperWindow:="Stardew Valley 1.6.8 - running SMAPI"
} }
; Alt to hold or repeat mouse buttons ; Alt to hold or repeat mouse buttons
*!LButton UP::HoldOrRepeat("LButton",["RButton","MButton"]) *!LButton UP::HoldOrRepeat("LButton",["LButton","RButton","MButton"])
*!RButton UP::HoldOrRepeat("RButton",["LButton","MButton"]) *!RButton UP::HoldOrRepeat("RButton",["RButton","LButton","MButton"])

21
scripts/Subnautica.ahk

@ -14,18 +14,21 @@ WrapperWindow:="Subnautica"
; Hotkeys ; Hotkeys
; ;
SendMode "Event"
HoldRepeat_TimerPeriod:=20
; Alt + direction: automove ; Alt + direction: automove
*!w UP::Hold("w",["s"]) *!w UP::Hold("w",["w","s"])
*!s UP::Hold("s",["w"]) *!s UP::Hold("s",["w","s"])
*!a UP::Hold("a",["d","w","s"]) *!a UP::Hold("a",["a","d","w","s"])
*!d UP::Hold("d",["a","w","s"]) *!d UP::Hold("d",["d","a","w","s"])
*!Space UP::Hold("Space",["LShift"]) *!Space UP::Hold("Space",["Space","LShift"])
*!LShift Up::Hold("LShift",["Space"]) *!LShift Up::Hold("LShift",["LShift","Space"])
; Alt + mouse key: hold key ; Alt + mouse key: hold key
*!LButton UP::Hold("LButton",["RButton","MButton"]) *!LButton UP::Hold("LButton",["LButton","RButton","MButton"])
*!RButton UP::Hold("RButton",["LButton","MButton"]) *!RButton UP::Hold("RButton",["RButton","LButton","MButton"])
; Turbo click to break rocks when caps lock on ; Turbo click to break rocks when caps lock on
#HotIf GetKeyState("CapsLock","T") #HotIf GetKeyState("CapsLock","T")
*LButton::Turbo("LButton") *LButton::Repeat("LButton",,"LButton")

12
scripts/Valheim.ahk

@ -15,13 +15,15 @@ WrapperWindow:="Valheim"
; Hotkeys ; Hotkeys
; ;
HoldRepeat_BlindMode:=""
; Hold E ; Hold E
*#e UP::Hold("e",["LButton", "RButton","q","r"],,false) *#e UP::Hold("e",["e","LButton", "RButton","q","r"])
; Autorun ; Autorun
*#w UP::Hold("w",["s"],,false) *#w UP::Hold("w",["w","s"])
*#Shift UP::Hold("Shift",["Ctrl"],["w"],false) *#Shift UP::Hold("Shift",["Shift","Ctrl"],["w"])
; Autoclick ; Autoclick
*#LButton UP::HoldOrRepeat("LButton",["RButton","MButton"],false) *#LButton UP::HoldOrRepeat("LButton",["LButton","RButton","MButton"])
*#RButton UP::HoldOrRepeat("RButton",["LButton","MButton"],false) *#RButton UP::HoldOrRepeat("RButton",["RButton","LButton","MButton"])
Loading…
Cancel
Save