8 changed files with 84 additions and 70 deletions
@ -0,0 +1,16 @@ |
|||||
|
; |
||||
|
; Turn script into wrapper for a program |
||||
|
; |
||||
|
|
||||
|
CheckWinExist(Window) { |
||||
|
if !WinExist(Window) { |
||||
|
ExitApp |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
Run %WrapperPath% |
||||
|
WinWait %WrapperWindow% |
||||
|
|
||||
|
; Check if window exists once per second |
||||
|
WrapperFunc := Func("CheckWinExist").bind(WrapperWindow) |
||||
|
SetTimer, %WrapperFunc%, 1000 |
@ -0,0 +1,66 @@ |
|||||
|
; 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 |
||||
|
|
||||
|
; |
||||
|
; 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 |
@ -1,67 +0,0 @@ |
|||||
; 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 |
|
||||
|
|
||||
; Only do hotkeys if relevant window is active |
|
||||
#If WinActive("Minecraft") |
|
||||
|
|
||||
; |
|
||||
; Hotkeys |
|
||||
; |
|
||||
|
|
||||
; Tab will be the hotkey |
|
||||
~Tab::return |
|
||||
|
|
||||
*!RButton:: |
|
||||
Send {RButton} |
|
||||
Sleep 100 |
|
||||
Send {Esc down} |
|
||||
Sleep 50 |
|
||||
Send {Esc up} |
|
||||
return |
|
||||
|
|
||||
; Hold/Autoclick mouse buttons |
|
||||
; Holds if single click, autoclicks if double click |
|
||||
Tab & LButton UP::HoldOrRepeat("LButton",["RButton","MButton"]) |
|
||||
Tab & RButton UP::HoldOrRepeat("RButton",["LButton","MButton"]) |
|
||||
|
|
||||
; Autorun |
|
||||
Tab & w UP::Hold("w",["s"]) |
|
||||
Tab & s UP::Hold("s",["w"]) |
|
||||
Tab & a UP::Hold("a",["d","w","s"]) |
|
||||
Tab & d UP::Hold("d",["a","w","s"]) |
|
||||
|
|
||||
; Hold crouch |
|
||||
Tab & Shift UP:: |
|
||||
if GetKeyState("Alt","P") { |
|
||||
Hold("Shift",["Ctrl"]) |
|
||||
} else { |
|
||||
Hold("Shift",["Ctrl","Space"]) |
|
||||
} |
|
||||
return |
|
||||
|
|
||||
; Autojump/auto-ascend |
|
||||
Tab & 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 |
|
Loading…
Reference in new issue