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)
; Sets key to hold if single tap, or repeat if double tap
HoldOrRepeat(TargetKey, CancelKeys?, HoldKey?) {
HoldOrRepeat(TargetKey, CancelKeys:=[]) {
global HoldRepeat_BlindMode
Send HoldRepeat_BlindMode "{" TargetKey " down}"
@ -83,5 +83,10 @@ HoldOrRepeat(TargetKey, CancelKeys?, HoldKey?) {
} else {
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")
; Autorun
*!w UP::Hold("w",["s"])
*!s UP::Hold("s",["w"])
*!a UP::Hold("a",["d","w","s"])
*!d UP::Hold("d",["a","w","s"])
*!w UP::Hold("w",["w","s"])
*!s UP::Hold("s",["w","s"])
*!a UP::Hold("a",["a","d","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
#HotIf (GetKeyState("CapsLock","T") and FullAutoEnabled[EquipState])
*LButton::Repeat("LButton",,"LButton")
*LButton::Repeat("LButton")
;
; Distruptive macros
@ -79,7 +79,7 @@ RemoveTooltip() {
#HotIf
; 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
*LShift::{

16
scripts/Minecraft Bedrock Edition.ahk

@ -40,20 +40,20 @@ return
; Hold/Autoclick mouse buttons
; Holds if single click, autoclicks if double click
vkFF & LButton UP::HoldOrRepeat("LButton",["RButton","MButton"])
vkFF & RButton UP::HoldOrRepeat("RButton",["LButton","MButton"])
vkFF & LButton UP::HoldOrRepeat("LButton",["LButton","RButton","MButton"])
vkFF & RButton UP::HoldOrRepeat("RButton",["RButton","LButton","MButton"])
; Autorun
vkFF & w UP::Hold("w",["s"])
vkFF & s UP::Hold("s",["w"])
vkFF & a UP::Hold("a",["d","w","s"])
vkFF & d UP::Hold("d",["a","w","s"])
vkFF & w UP::Hold("w",["w","s"])
vkFF & s UP::Hold("s",["w","s"])
vkFF & a UP::Hold("a",["a","d","w","s"])
vkFF & d UP::Hold("d",["d","a","w","s"])
; Hold crouch
vkFF & Shift UP::Hold("Shift",["Ctrl"])
vkFF & Shift UP::Hold("Shift",["Shift","Ctrl"])
; Autojump/auto-ascend
vkFF & Space UP::Hold("Space",["Shift"])
vkFF & Space UP::Hold("Space",["Space","Shift"])
; Mouse button 4: auto-takeoff
; 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
*!LButton UP::HoldOrRepeat("LButton",["RButton","MButton"])
*!RButton UP::HoldOrRepeat("RButton",["LButton","MButton"])
*!LButton UP::HoldOrRepeat("LButton",["LButton","RButton","MButton"])
*!RButton UP::HoldOrRepeat("RButton",["RButton","LButton","MButton"])

21
scripts/Subnautica.ahk

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

12
scripts/Valheim.ahk

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