1) Upon holding the right mouse Button, set XButton1 as down as long as the right mouse button is down
(So to clarify: RButton should not be set as down at this point, only XButton1)
2) After a very short delay (10 ms), also set RButton as down as long as the right mouse button is held down
3) When right mouse button is released / up, release both Mouse Button 4 as well as RButton
Additionally, it would be nice if when I hold the physical Right Click button down, thén physically hold down Mouse Button 4, thén release the Right Click button, the script does not set XButton1 as Up while I'm holding it down
So far I've only been able to create a loop, but this doesn't seem to work in the game.
Instead it seems to acts as a toggle: clicking the Right Mouse Button sets Mouse Button 4 as down until I click the RMB again and is a bit janky (that's why I want the short 10ms delay)
Code: Select all
#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.
RButton::
Loop {
Send {XButton1 Down}
} Until !GetKeyState("RButton","P")
Return
RButton Up:: Send {XButton1 Up}