Skip to content

Instantly share code, notes, and snippets.

@Alistair1231
Last active November 1, 2025 16:56
Show Gist options
  • Save Alistair1231/bfea490cce52e20c3294de35f462e297 to your computer and use it in GitHub Desktop.
Save Alistair1231/bfea490cce52e20c3294de35f462e297 to your computer and use it in GitHub Desktop.
#Requires AutoHotkey 2.0
#SingleInstance Force
#HotIf WinActive("ahk_exe ShooterGame.exe")
global HotBarCounter:=0
WheelUp:: {
global HotBarCounter
Send(--HotBarCounter=10?HotBarCounter:=0:HotBarCounter)
}
WheelDown:: {
global HotBarCounter
Send(++HotBarCounter=0?HotBarCounter:=9:HotBarCounter)
}
1:: {
global HotBarCounter
HotBarCounter:=1
Send 1
}
2:: {
global HotBarCounter
HotBarCounter:=2
Send 2
}
3:: {
global HotBarCounter
HotBarCounter:=3
Send 3
}
4:: {
global HotBarCounter
HotBarCounter:=4
Send 4
}
5:: {
global HotBarCounter
HotBarCounter:=5
Send 5
}
6:: {
global HotBarCounter
HotBarCounter:=6
Send 6
}
7:: {
global HotBarCounter
HotBarCounter:=7
Send 7
}
8:: {
global HotBarCounter
HotBarCounter:=8
Send 8
}
9:: {
global HotBarCounter
HotBarCounter:=9
Send 9
}
0:: {
global HotBarCounter
HotBarCounter:=0
Send 0
}
$LButton::
{
; Wait 1/2 second for user to release "a" key
KeyWait("LButton", "D T0.5") ; Still held down
While GetKeyState("LButton","p"){ ; While it is held down
Click
Send "{LButton}"
Sleep 100
}
Send "{LButton}"
}
#HotIf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment