Skip to content

Instantly share code, notes, and snippets.

@joar
Created Aug 5, 2020
Embed
What would you like to do?
#SingleInstance, Force
#KeyHistory, 0
SetBatchLines, -1
ListLines, Off
;SendMode Input ; Forces Send and SendRaw to use SendInput buffering for speed.
; SetTitleMatchMode, 3 ; A window's title must exactly match WinTitle to be a match.
SetWorkingDir, %A_ScriptDir%
SplitPath, A_ScriptName, , , , thisscriptname
#MaxThreadsPerHotkey, 1 ; no re-entrant hotkey handling
; DetectHiddenWindows, On
; SetWinDelay, -1 ; Remove short delay done automatically after every windowing command except IfWinActive and IfWinExist
; SetKeyDelay, -1, -1 ; Remove short delay done automatically after every keystroke sent by Send or ControlSend
; SetMouseDelay, -1 ; Remove short delay done automatically after Click and MouseMove/Click/Drag
SetTitleMatchMode, 1 ; A window's title start with WinTitle to be a match.
#IfWinActive, Minecraft
{
$XButton2::
;KeyWait, PgDn
While GetKeyState("XButton2", "P") {
Send {RButton}
Sleep 1000 / 30 ; 60/s is too quick
}
Return
}
^PgDn::
SoundPlay, *-1, Wait
ExitApp, 0
@portaltree
Copy link

portaltree commented Jun 3, 2021

thank you for making this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment