Skip to content

Instantly share code, notes, and snippets.

@akiraaisha
Last active April 5, 2021 06:39
Show Gist options
  • Save akiraaisha/9e8d8e9dd3fe6c822015cd03691bca58 to your computer and use it in GitHub Desktop.
Save akiraaisha/9e8d8e9dd3fe6c822015cd03691bca58 to your computer and use it in GitHub Desktop.
Improvement
SetTitleMatchMode, 2
#SingleInstance force
#IfWinActive ahk_exe r5apex.exe
#MaxThreadsPerHotkey 2
*XButton2::
While GetKeyState("XButton2","P") {
Send, {PgUp}
Send {E}
Send {Space}
sleep 1
if !GetKeyState("XButton2","P") {
break
}
}
return
~*XButton1::
Send {Space}
Send {ctrl down}
if (GetKeyState("a", "P")){
loop{
Send, {a}
Sleep 2
{
if !GetKeyState("XButton1","P") {
Send {ctrl up}
break
}
}
}
return
}
if (GetKeyState("d", "P")){
loop{
Send, {d}
Sleep 2
{
if !GetKeyState("XButton1","P") {
Send {ctrl up}
break
}
}
}
return
}
if (GetKeyState("s", "P")){
loop{
Send, {s}
Sleep 2
{
if !GetKeyState("XButton1","P") {
Send {ctrl up}
break
}
}
}
return
}
else {
loop{
Send, {Numpad8}
Sleep 2
}
Until !GetKeyState("XButton1","P")
Send {ctrl up}
}
return
ALT & LBUTTON::
Loop {
Send {LBUTTON}
DllCall("mouse_event", uint, 1, int, -5.30, int, 2.8, uint, 2, int, 0)
DllCall("mouse_event", uint, 1, int, 5.7, int, 2, uint, 0, int, 0)
Sleep, .2
}
Until !GetKeyState("LBUTTON","P")
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment