Spam key every x seconds when pressed mouse2 Topic is solved

Ask gaming related questions (AHK v1.1 and older)
zablotzky
Posts: 1
Joined: 27 Oct 2021, 14:59

Spam key every x seconds when pressed mouse2

Post by zablotzky » 27 Oct 2021, 15:04

I am pretty sure this was already solved before, yet I struggle to find a working solution.

The game: Diablo III
The goal: press Q every 4 seconds while having pressed RMB --> I have one spell on RMB which is channeled, I want to trigger another spell every 4 seconds but only when I am channeling that RMB skill.

I have the following:

Code: Select all

*RButton::
While, GetKeyState("RButton", "P")
{
	Send Q
	Sleep 4000
}
Return
It triggers Q every 4 seconds while holding RMB, but then my RMB skill is not channeling :<

User avatar
mikeyww
Posts: 26596
Joined: 09 Sep 2014, 18:38

Re: Spam key every x seconds when pressed mouse2  Topic is solved

Post by mikeyww » 27 Oct 2021, 15:44

Code: Select all

~RButton Up::SetTimer, Q, Off
~RButton::
SetTimer, Q, 4000
Q:
Send q
Return

Post Reply

Return to “Gaming Help (v1)”