Requesting a simple code

Ask gaming related questions (AHK v1.1 and older)
Cephalon Silent
Posts: 1
Joined: 22 Jul 2018, 16:19

Requesting a simple code

22 Jul 2018, 16:25

i would need a code that holds the right arrow key for 10 seconds, then the left arrow key for ten seconds and loops. for a game this is, thanks in advance :D
Rohwedder
Posts: 7613
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Requesting a simple code

23 Jul 2018, 03:33

Hallo,
try:

Code: Select all

F4:: ;On/Off with key F4
If SendKeys:=!SendKeys
{
	SetTimer SendKeys, 10000 ;10s period
	Gosub, SendKeys
}
Else
{
	SetTimer SendKeys, Off
	Send, {Left Up}{Right Up}
}
Return
SendKeys:
IF Right:=!Right
	Send, {Left Up}{Right Down}
Else	
	Send, {Right Up}{Left Down}
Return

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 45 guests