diff --git a/src/AutorunAutoclick.ahk b/scripts/AutorunAutoclick.ahk similarity index 88% rename from src/AutorunAutoclick.ahk rename to scripts/AutorunAutoclick.ahk index 2f88ea9..2cf84ab 100644 --- a/src/AutorunAutoclick.ahk +++ b/scripts/AutorunAutoclick.ahk @@ -1,25 +1,25 @@ -; -; Front Matter -; - -; Include relevant libraries -#Include ../lib/Prelude.ahk -#Include ../lib/HoldRepeat.ahk - -; -; Hotkeys -; - -; Hold/Autoclick mouse buttons -; Holds if single click, autoclicks if double click -*!LButton UP::HoldOrRepeat("LButton") -*!RButton UP::HoldOrRepeat("RButton") - -; Hold/Repeat spacebar -*!Space UP::HoldOrRepeat("Space") - -; Autorun -*!w UP::Hold("w",["s"]) -*!s UP::Hold("s",["w"]) -*!a UP::Hold("a",["d","w","s"]) +; +; Front Matter +; + +; Include relevant libraries +#Include ../lib/Prelude.ahk +#Include ../lib/HoldRepeat.ahk + +; +; Hotkeys +; + +; Hold/Autoclick mouse buttons +; Holds if single click, autoclicks if double click +*!LButton UP::HoldOrRepeat("LButton") +*!RButton UP::HoldOrRepeat("RButton") + +; Hold/Repeat spacebar +*!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"]) \ No newline at end of file diff --git a/src/Dark Souls III.ahk b/scripts/Dark Souls III.ahk similarity index 95% rename from src/Dark Souls III.ahk rename to scripts/Dark Souls III.ahk index b2320f4..b3002d0 100644 --- a/src/Dark Souls III.ahk +++ b/scripts/Dark Souls III.ahk @@ -1,39 +1,39 @@ -; Script can be directly run by or compiled into an .exe by the open-source software AutoHotkey -; https://www.autohotkey.com - -; -; Front Matter -; - -; Include general library -#Include ../lib/Prelude.ahk - -; Include XInput library -#Include ../thirdparty/XInput/XInput.ahk - -; Only do hotkeys if relevant window is -;#If WinActive("Dark Souls III") - -; -; Hotkeys -; -XInput_Init() - -PrevState := 0 -Loop { - State := XInput_GetState(0) - if ( State.wButtons & XINPUT_GAMEPAD_LEFT_THUMB ) { - if (PrevState == 0) { - Send {LButton down} - Send {w down} - PrevState := 1 - } - } else { - if (PrevState == 1) { - Send {LButton up} - Send {w up} - PrevState := 0 - } - } - Sleep 50 +; Script can be directly run by or compiled into an .exe by the open-source software AutoHotkey +; https://www.autohotkey.com + +; +; Front Matter +; + +; Include general library +#Include ../lib/Prelude.ahk + +; Include XInput library +#Include ../thirdparty/XInput/XInput.ahk + +; Only do hotkeys if relevant window is +;#If WinActive("Dark Souls III") + +; +; Hotkeys +; +XInput_Init() + +PrevState := 0 +Loop { + State := XInput_GetState(0) + if ( State.wButtons & XINPUT_GAMEPAD_LEFT_THUMB ) { + if (PrevState == 0) { + Send {LButton down} + Send {w down} + PrevState := 1 + } + } else { + if (PrevState == 1) { + Send {LButton up} + Send {w up} + PrevState := 0 + } + } + Sleep 50 } \ No newline at end of file diff --git a/src/Deep Rock Galactic.ahk b/scripts/Deep Rock Galactic.ahk similarity index 95% rename from src/Deep Rock Galactic.ahk rename to scripts/Deep Rock Galactic.ahk index a4eb30c..ca9d2a6 100644 --- a/src/Deep Rock Galactic.ahk +++ b/scripts/Deep Rock Galactic.ahk @@ -1,97 +1,97 @@ -; -; Front Matter -; - -; Include relevant libraries -#Include "../lib/Prelude.ahk" -#Include "../lib/HoldRepeat.ahk" - -; Make this a wrapper script -WrapperPath:="steam://rungameid/548430" -WrapperWindow:="Deep Rock Galactic " -#Include "../lib/Wrapper.ahk" - -; Initialize variables -FullAutoEnabled := [0,0,0,0,1] -EquipState := 1 - -ToggleFullAuto(Index) { - global FullAutoEnabled - FullAutoEnabled[Index] := !FullAutoEnabled[Index] - EnabledDisabled := (FullAutoEnabled[Index] ? "enabled" : "disabled") - if (Index == 5) { - ToolTip "Distruptive macros " EnabledDisabled, A_ScreenWidth // 2, A_ScreenHeight // 2 - } else { - ToolTip "Full Auto " EnabledDisabled " for " Index, A_ScreenWidth // 2, A_ScreenHeight // 2 - } - SetTimer RemoveTooltip, -1000 -} - -RemoveTooltip() { - ToolTip -} - -; -; Hotkeys -; - -; -; Full Auto -; - -; Keep track of what is equipped -~*1:: global EquipState:=1 -~*2:: global EquipState:=2 -~*3:: global EquipState:=3 -~*4:: global EquipState:=4 - -; FN toggles full auto for weapon N -*F1::ToggleFullAuto(1) -*F2::ToggleFullAuto(2) -*F3::ToggleFullAuto(3) -*F4::ToggleFullAuto(4) -*F5::ToggleFullAuto(5) - -; Do full auto when caps lock is on for enabled weapons -#HotIf (GetKeyState("CapsLock","T") and FullAutoEnabled[EquipState]) -*LButton::Repeat("LButton",,"LButton") - -; -; Distruptive macros -; -#HotIf FullAutoEnabled[5] - -; Hold space rapidly jumps -*Space::Turbo("Space") - -; Hold f to rapidly deposit -*f::{ - While GetKeyState("f","P") { - Send "{Blind}{e down}" - Sleep 20 - Send "{Blind}{LCtrl down}" - Sleep 20 - Send "{Blind}{LCtrl up}{e up}" - Sleep 20 - } -} - - -; -; Non-disruptive macros -; -#HotIf - -; Alt + E holds E -*!e UP::Hold("e",["w","a","s","d","Space","LButton","RButton"]) - -; Press shift to sprint, only toggles on -*LShift::{ - Send "{Blind}{LShift up}{LShift down}" - KeyWait("LShift") -} -*LShift UP::Hold("LShift",,"w") - -; Grenade animation canceling -*MButton::Send "{Blind}{LCtrl down}{MButton down}" -*MButton UP::Send "{Blind}{LCtrl up}{MButton up}" +; +; Front Matter +; + +; Include relevant libraries +#Include "../lib/Prelude.ahk" +#Include "../lib/HoldRepeat.ahk" + +; Make this a wrapper script +WrapperPath:="steam://rungameid/548430" +WrapperWindow:="Deep Rock Galactic " +#Include "../lib/Wrapper.ahk" + +; Initialize variables +FullAutoEnabled := [0,0,0,0,1] +EquipState := 1 + +ToggleFullAuto(Index) { + global FullAutoEnabled + FullAutoEnabled[Index] := !FullAutoEnabled[Index] + EnabledDisabled := (FullAutoEnabled[Index] ? "enabled" : "disabled") + if (Index == 5) { + ToolTip "Distruptive macros " EnabledDisabled, A_ScreenWidth // 2, A_ScreenHeight // 2 + } else { + ToolTip "Full Auto " EnabledDisabled " for " Index, A_ScreenWidth // 2, A_ScreenHeight // 2 + } + SetTimer RemoveTooltip, -1000 +} + +RemoveTooltip() { + ToolTip +} + +; +; Hotkeys +; + +; +; Full Auto +; + +; Keep track of what is equipped +~*1:: global EquipState:=1 +~*2:: global EquipState:=2 +~*3:: global EquipState:=3 +~*4:: global EquipState:=4 + +; FN toggles full auto for weapon N +*F1::ToggleFullAuto(1) +*F2::ToggleFullAuto(2) +*F3::ToggleFullAuto(3) +*F4::ToggleFullAuto(4) +*F5::ToggleFullAuto(5) + +; Do full auto when caps lock is on for enabled weapons +#HotIf (GetKeyState("CapsLock","T") and FullAutoEnabled[EquipState]) +*LButton::Repeat("LButton",,"LButton") + +; +; Distruptive macros +; +#HotIf FullAutoEnabled[5] + +; Hold space rapidly jumps +*Space::Turbo("Space") + +; Hold f to rapidly deposit +*f::{ + While GetKeyState("f","P") { + Send "{Blind}{e down}" + Sleep 20 + Send "{Blind}{LCtrl down}" + Sleep 20 + Send "{Blind}{LCtrl up}{e up}" + Sleep 20 + } +} + + +; +; Non-disruptive macros +; +#HotIf + +; Alt + E holds E +*!e UP::Hold("e",["w","a","s","d","Space","LButton","RButton"]) + +; Press shift to sprint, only toggles on +*LShift::{ + Send "{Blind}{LShift up}{LShift down}" + KeyWait("LShift") +} +*LShift UP::Hold("LShift",,"w") + +; Grenade animation canceling +*MButton::Send "{Blind}{LCtrl down}{MButton down}" +*MButton UP::Send "{Blind}{LCtrl up}{MButton up}" diff --git a/src/Minecraft Bedrock Edition.ahk b/scripts/Minecraft Bedrock Edition.ahk similarity index 94% rename from src/Minecraft Bedrock Edition.ahk rename to scripts/Minecraft Bedrock Edition.ahk index badc98c..491ae3a 100644 --- a/src/Minecraft Bedrock Edition.ahk +++ b/scripts/Minecraft Bedrock Edition.ahk @@ -1,72 +1,72 @@ -; Script can be directly run by or compiled into an .exe by the open-source software AutoHotkey -; https://www.autohotkey.com - -; -; Front Matter -; - -; Include relevant libraries -#Include ../lib/Prelude.ahk -#Include ../lib/HoldRepeat.ahk - -; Make this a wrapper script -WrapperPath:="shell:AppsFolder\Microsoft.MinecraftUWP_8wekyb3d8bbwe!App" -WrapperWindow:="Minecraft" -#Include ../lib/Wrapper.ahk - -; Send an F4 to activate fullscreen -Sleep 1000 -Send {F4 down} -Sleep 100 -Send {F4 up} - -; -; Hotkeys -; - -; Remap LAlt so it doesn't active Minecraft's Alt+Space menu shortcut -#InputLevel 1 -*LAlt::vkFF -#InputLevel 0 -vkFF & Tab:: -Send {Alt down} -Send {Blind}{Tab} -SetTimer, AltUp, -1 -return -AltUp: -KeyWait LAlt -Send {Alt up} -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"]) - -; 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"]) - -; Hold crouch -vkFF & Shift UP::Hold("Shift",["Ctrl"]) - -; Autojump/auto-ascend -vkFF & Space UP::Hold("Space",["Shift"]) - -; Mouse button 4: auto-takeoff -; Macro assumes you have your fireworks in the first hotbar slot -XButton1:: -Loop, 5 { - Send {Space down} - Sleep 10 -} -Send {Space up}1 -Sleep 225 -Loop, 5 { - Send {Space down} - Sleep 10 -} -Send {Space up}{RButton} +; Script can be directly run by or compiled into an .exe by the open-source software AutoHotkey +; https://www.autohotkey.com + +; +; Front Matter +; + +; Include relevant libraries +#Include ../lib/Prelude.ahk +#Include ../lib/HoldRepeat.ahk + +; Make this a wrapper script +WrapperPath:="shell:AppsFolder\Microsoft.MinecraftUWP_8wekyb3d8bbwe!App" +WrapperWindow:="Minecraft" +#Include ../lib/Wrapper.ahk + +; Send an F4 to activate fullscreen +Sleep 1000 +Send {F4 down} +Sleep 100 +Send {F4 up} + +; +; Hotkeys +; + +; Remap LAlt so it doesn't active Minecraft's Alt+Space menu shortcut +#InputLevel 1 +*LAlt::vkFF +#InputLevel 0 +vkFF & Tab:: +Send {Alt down} +Send {Blind}{Tab} +SetTimer, AltUp, -1 +return +AltUp: +KeyWait LAlt +Send {Alt up} +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"]) + +; 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"]) + +; Hold crouch +vkFF & Shift UP::Hold("Shift",["Ctrl"]) + +; Autojump/auto-ascend +vkFF & Space UP::Hold("Space",["Shift"]) + +; Mouse button 4: auto-takeoff +; Macro assumes you have your fireworks in the first hotbar slot +XButton1:: +Loop, 5 { + Send {Space down} + Sleep 10 +} +Send {Space up}1 +Sleep 225 +Loop, 5 { + Send {Space down} + Sleep 10 +} +Send {Space up}{RButton} return \ No newline at end of file diff --git a/src/Orcs Must Die.ahk b/scripts/Orcs Must Die.ahk similarity index 71% rename from src/Orcs Must Die.ahk rename to scripts/Orcs Must Die.ahk index dcd40aa..5de7891 100644 --- a/src/Orcs Must Die.ahk +++ b/scripts/Orcs Must Die.ahk @@ -1,13 +1,13 @@ -; -; Front Matter -; - -; Include relevant libraries -#Include ../lib/Prelude.ahk - -; -; Hotkeys -; - -*RButton::TurboOn("LButton","RButton") +; +; Front Matter +; + +; Include relevant libraries +#Include ../lib/Prelude.ahk + +; +; Hotkeys +; + +*RButton::TurboOn("LButton","RButton") *RButton UP::TurboOff("LButton","RButton") \ No newline at end of file diff --git a/src/Outer Wilds.ahk b/scripts/Outer Wilds.ahk similarity index 93% rename from src/Outer Wilds.ahk rename to scripts/Outer Wilds.ahk index 5447048..840505d 100644 --- a/src/Outer Wilds.ahk +++ b/scripts/Outer Wilds.ahk @@ -1,93 +1,93 @@ -; Script can be directly run by or compiled into an .exe by the open-source software AutoHotkey -; https://www.autohotkey.com - -; -; Front Matter -; - -; Include general library -#Include ../lib/Prelude.ahk -#Include ../lib/Stopwatch.ahk - -; Include ViGEm library -#Include ../thirdparty/AHK-ViGEm-Bus/AHK-ViGEm-Bus.ahk -; Create a new Xbox 360 controller -MyXbox := new ViGEmXb360() - -; Make this a wrapper script -WrapperPath:="steam://rungameid/753640" -WrapperWindow:="Outer Wilds" -#Include ../lib/Wrapper.ahk - -; Set percent to deflect by for fine controls -Defl := 40 - -; Create Gui for timer -Gui, +AlwaysOnTop -Caption +ToolWindow -Gui, Margin, 0, 0 -Gui, Font, s20 CWhite -Gui, Color, Black -Gui, Add, Text, vStopwatchText +Center, 00:00 -Gui, Show, NoActivate x0 y0, StopwatchGui -WinSet, TransColor, Black 100, StopwatchGui -StopwatchHide() - -; -; Hotkeys -; - -; -; Stopwatch -; - -; Alt+F1: Show/Hide stopwatch -!F1::StopwatchToggleHidden() - -#If not StopwatchHidden - -; F1: Reset stopwatch -F1::StopwatchReset() - -; F2: Start/stop stopwatch -F2::StopwatchToggle() - -; F3: Rewind stopwatch 5 sec -F3::StopwatchRewind(5) - -; F4: Fastforward stopwatch 5 sec -F4::StopwatchFastforward(5) - -; -; Fine Controls -; - -#If 1 - -; Reset all axes when capslock is pressed -~CapsLock:: -MyXbox.Axes.LY.SetState(50) -MyXbox.Axes.LX.SetState(50) -MyXbox.Axes.RT.SetState(0) -MyXbox.Axes.LT.SetState(0) -return - -; Fine control is active when caps lock is on -#If GetKeyState("CapsLock","T") - -W::MyXbox.Axes.LY.SetState(50+Defl*.5) -W UP::MyXbox.Axes.LY.SetState(50) - -S::MyXbox.Axes.LY.SetState(50-Defl*.5) -S UP::MyXbox.Axes.LY.SetState(50) - -D::MyXbox.Axes.LX.SetState(50+Defl*.5) -D UP::MyXbox.Axes.LX.SetState(50) - -A::MyXbox.Axes.LX.SetState(50-Defl*.5) -A UP::MyXbox.Axes.LX.SetState(50) - -Space::MyXbox.Axes.RT.SetState(Defl*.16) -Space UP::MyXbox.Axes.RT.SetState(0) - -Shift::MyXbox.Axes.LT.SetState(Defl*.16) +; Script can be directly run by or compiled into an .exe by the open-source software AutoHotkey +; https://www.autohotkey.com + +; +; Front Matter +; + +; Include general library +#Include ../lib/Prelude.ahk +#Include ../lib/Stopwatch.ahk + +; Include ViGEm library +#Include ../thirdparty/AHK-ViGEm-Bus/AHK-ViGEm-Bus.ahk +; Create a new Xbox 360 controller +MyXbox := new ViGEmXb360() + +; Make this a wrapper script +WrapperPath:="steam://rungameid/753640" +WrapperWindow:="Outer Wilds" +#Include ../lib/Wrapper.ahk + +; Set percent to deflect by for fine controls +Defl := 40 + +; Create Gui for timer +Gui, +AlwaysOnTop -Caption +ToolWindow +Gui, Margin, 0, 0 +Gui, Font, s20 CWhite +Gui, Color, Black +Gui, Add, Text, vStopwatchText +Center, 00:00 +Gui, Show, NoActivate x0 y0, StopwatchGui +WinSet, TransColor, Black 100, StopwatchGui +StopwatchHide() + +; +; Hotkeys +; + +; +; Stopwatch +; + +; Alt+F1: Show/Hide stopwatch +!F1::StopwatchToggleHidden() + +#If not StopwatchHidden + +; F1: Reset stopwatch +F1::StopwatchReset() + +; F2: Start/stop stopwatch +F2::StopwatchToggle() + +; F3: Rewind stopwatch 5 sec +F3::StopwatchRewind(5) + +; F4: Fastforward stopwatch 5 sec +F4::StopwatchFastforward(5) + +; +; Fine Controls +; + +#If 1 + +; Reset all axes when capslock is pressed +~CapsLock:: +MyXbox.Axes.LY.SetState(50) +MyXbox.Axes.LX.SetState(50) +MyXbox.Axes.RT.SetState(0) +MyXbox.Axes.LT.SetState(0) +return + +; Fine control is active when caps lock is on +#If GetKeyState("CapsLock","T") + +W::MyXbox.Axes.LY.SetState(50+Defl*.5) +W UP::MyXbox.Axes.LY.SetState(50) + +S::MyXbox.Axes.LY.SetState(50-Defl*.5) +S UP::MyXbox.Axes.LY.SetState(50) + +D::MyXbox.Axes.LX.SetState(50+Defl*.5) +D UP::MyXbox.Axes.LX.SetState(50) + +A::MyXbox.Axes.LX.SetState(50-Defl*.5) +A UP::MyXbox.Axes.LX.SetState(50) + +Space::MyXbox.Axes.RT.SetState(Defl*.16) +Space UP::MyXbox.Axes.RT.SetState(0) + +Shift::MyXbox.Axes.LT.SetState(Defl*.16) Shift UP::MyXbox.Axes.LT.SetState(0) \ No newline at end of file diff --git a/src/Stardew Valley.ahk b/scripts/Stardew Valley.ahk similarity index 100% rename from src/Stardew Valley.ahk rename to scripts/Stardew Valley.ahk diff --git a/src/Subnautica.ahk b/scripts/Subnautica.ahk similarity index 90% rename from src/Subnautica.ahk rename to scripts/Subnautica.ahk index 1d06393..f9f2f2e 100644 --- a/src/Subnautica.ahk +++ b/scripts/Subnautica.ahk @@ -1,29 +1,29 @@ -; -; Front Matter -; - -; Include relevant libraries -#Include ../lib/Prelude.ahk -#Include ../lib/HoldRepeat.ahk - -WrapperPath:="steam://rungameid/264710" -WrapperWindow:="Subnautica" -#Include ../lib/Wrapper.ahk - -; -; Hotkeys -; - -; Hold/Autoclick mouse buttons -; Holds if single click, autoclicks if double click -*!LButton UP::HoldOrRepeat("LButton",[]) -*!RButton UP::HoldOrRepeat("RButton",[]) - -; Hold/Repeat spacebar -*!Space UP::HoldOrRepeat("Space",["LShift"]) - -; Autorun -*!w UP::Hold("w",["s"]) -*!s UP::Hold("s",["w"]) -*!a UP::Hold("a",["d","w","s"]) +; +; Front Matter +; + +; Include relevant libraries +#Include ../lib/Prelude.ahk +#Include ../lib/HoldRepeat.ahk + +WrapperPath:="steam://rungameid/264710" +WrapperWindow:="Subnautica" +#Include ../lib/Wrapper.ahk + +; +; Hotkeys +; + +; Hold/Autoclick mouse buttons +; Holds if single click, autoclicks if double click +*!LButton UP::HoldOrRepeat("LButton",[]) +*!RButton UP::HoldOrRepeat("RButton",[]) + +; Hold/Repeat spacebar +*!Space UP::HoldOrRepeat("Space",["LShift"]) + +; 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"]) \ No newline at end of file diff --git a/src/Valheim.ahk b/scripts/Valheim.ahk similarity index 96% rename from src/Valheim.ahk rename to scripts/Valheim.ahk index 4697b90..e3b7e67 100644 --- a/src/Valheim.ahk +++ b/scripts/Valheim.ahk @@ -1,27 +1,27 @@ -; -; Front Matter -; - -; Include relevant libraries -#Include ../lib/Prelude.ahk -#Include ../lib/HoldRepeat.ahk - -; Make this a wrapper script -WrapperPath := Format("C:\Program Files (x86)\Steam\steam.exe -applaunch 892970 --doorstop-enable true --doorstop-target {1}\r2modmanPlus-local\Valheim\profiles\Default\BepInEx\core\BepInEx.Preloader.dll",A_AppData) -WrapperWindow:="Valheim" -#Include ../lib/Wrapper.ahk - -; -; Hotkeys -; - -; Hold E -*#e UP::Hold("e",["LButton", "RButton","q","r"],,false) - -; Autorun -*#w UP::Hold("w",["s"],,false) -*#Shift UP::Hold("Shift",["Ctrl"],["w"],false) - -; Autoclick -*#LButton UP::HoldOrRepeat("LButton",["RButton","MButton"],false) +; +; Front Matter +; + +; Include relevant libraries +#Include ../lib/Prelude.ahk +#Include ../lib/HoldRepeat.ahk + +; Make this a wrapper script +WrapperPath := Format("C:\Program Files (x86)\Steam\steam.exe -applaunch 892970 --doorstop-enable true --doorstop-target {1}\r2modmanPlus-local\Valheim\profiles\Default\BepInEx\core\BepInEx.Preloader.dll",A_AppData) +WrapperWindow:="Valheim" +#Include ../lib/Wrapper.ahk + +; +; Hotkeys +; + +; Hold E +*#e UP::Hold("e",["LButton", "RButton","q","r"],,false) + +; Autorun +*#w UP::Hold("w",["s"],,false) +*#Shift UP::Hold("Shift",["Ctrl"],["w"],false) + +; Autoclick +*#LButton UP::HoldOrRepeat("LButton",["RButton","MButton"],false) *#RButton UP::HoldOrRepeat("RButton",["LButton","MButton"],false) \ No newline at end of file