Last active
January 20, 2021 03:54
-
-
Save erm3nda/bc729a7811606ac81f03e19cc1cd8082 to your computer and use it in GitHub Desktop.
Enables auto aiming (right click) by simply firing (left click)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; This enables auto aim when firing. | |
; Manual aim works as usual | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
#Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
enabled := True | |
; Auto aim when firing | |
#IfWinActive, ahk_class GEMAINWINDOWCLASS | |
~LButton:: | |
If (not GetKeyState("RButton", "P") && enabled) ; do not mess if we aim manually | |
{ | |
Click Down | |
Click Down Right | |
} | |
return | |
; Stop aiming when stop firing | |
#IfWinActive, ahk_class GEMAINWINDOWCLASS | |
~LButton Up:: | |
If (not GetKeyState("RButton", "P") && enabled) ; do not mess if we aim manually | |
{ | |
Click Up | |
Click Up Right | |
} | |
return | |
; Re enable script | |
~WheelDown:: | |
~WheelUp:: | |
enabled := True | |
return | |
; Disable script (ie, grenades) | |
~1:: | |
~2:: | |
~3:: | |
~4:: | |
~5:: | |
enabled := False | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; This enables auto aim when firing. | |
; Also feature to prone clicking Right Mouse button, for ease. | |
; Manual aim works as usual | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
#Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
enabled := True | |
; Auto aim when firing | |
#IfWinActive, ahk_class GEMAINWINDOWCLASS | |
~LButton:: | |
If (not GetKeyState("RButton", "P") && enabled) ; do not mess if we aim manually | |
{ | |
Click Down | |
Click Down Right | |
} | |
return | |
; Stop aiming when stop firing | |
#IfWinActive, ahk_class GEMAINWINDOWCLASS | |
~LButton Up:: | |
If (not GetKeyState("RButton", "P") && enabled) ; do not mess if we aim manually | |
{ | |
Click Up | |
Click Up Right | |
} | |
return | |
; Prone with right click if we are shooting | |
#IfWinActive, ahk_class GEMAINWINDOWCLASS | |
~RButton:: | |
If (GetKeyState("LButton", "P") && enabled) ; Work only if we are shooting | |
{ | |
send {c down} | |
} | |
return | |
; Un-Prone with right only (do not unprone when finish magazine) | |
#IfWinActive, ahk_class GEMAINWINDOWCLASS | |
~RButton Up:: | |
If (GetKeyState("LButton", "P") && enabled) ; Work only if we are shooting | |
{ | |
send {c up} | |
} | |
return | |
; Re enable script | |
~WheelDown:: | |
~WheelUp:: | |
enabled := True | |
return | |
; Disable script (ie, grenades) | |
~1:: | |
~2:: | |
~3:: | |
~4:: | |
~5:: | |
enabled := False | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment