AHK Simple key press macro Topic is solved

Ask gaming related questions (AHK v1.1 and older)
furry moustache

AHK Simple key press macro  Topic is solved

01 Oct 2018, 10:22

Hi,is it possible to make this, when I press Q its does Q2, however it reset every 10seconds (I don't want it to do it automatically like timer a does it). During these 10 seconds I can press normal Q
This kinda work however, I can't press normal Q after.

Code: Select all

$q::
{

sendinput, q

sleep, 25

sendinput, 2

sleep 10000
}


Example
Press Q
It does (Q2)
press Q (after 5) seconds
It does Q
Press Q after 10 seconds of the first Q
It does Q2
...
User avatar
Onimuru
Posts: 107
Joined: 08 Sep 2018, 18:35
Contact:

Re: AHK Simple key press macro

01 Oct 2018, 15:08

Code: Select all

#SingleInstance Force
SendMode Input

Exit

~*$q::	;The q button acts normally with the addition of ~.
	If !Ten_Second_Timer	;If not true i.e. hasn't run in at least 10 seconds.
	{
		Ten_Second_Timer := True
		SetTimer, Ten_Second_Timer, -10000	;Run timer a single time.
		Send 2
	}
	Return

Ten_Second_Timer:
	Ten_Second_Timer := False	;Reset after 10 seconds.
	Return

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 52 guests