Make a macro key Topic is solved

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

Make a macro key

17 Dec 2017, 04:04

Can you guys help me? Cause im beginner and i dont know where to start, I want to make was a spam/macro key that will spam the Q,W,E,R and make a on and off of it. Please help me
Rohwedder
Posts: 7644
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Make a macro key  Topic is solved

17 Dec 2017, 04:57

Hallo,
try:

Code: Select all

F4:: ;On/Off with key F4
	If F4Active:=!F4Active
		SetTimer Keys, -1
Return
Keys:
	While, F4Active
	{
		Send, q
		Sleep, 50
		Send, w
		Sleep, 100
		Send, e
		Sleep, 200
		Send, r
		Sleep, 100
	}
Return
Another method:

Code: Select all

F4:: ;On/Off with key F4
    Keys = qwer
    If F4Active:=!F4Active
        SetTimer Keys, 250 ;250 ms delay between keys
    Else
        SetTimer Keys, Off
Return
Keys:
    Counter := Mod(0 Counter,StrLen(Keys))+1
    Send, % SubStr(Keys,Counter,1)
Return

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 84 guests