Page 1 of 1

Combining three scripts into one exe

Posted: 28 Jun 2017, 11:49
by jasonddgs1
Hey, I was wondering if it's possible to combine:

Code: Select all

#Persistent
SetTimer, PressTheKey, 6000
Return

PressTheKey:
Send, {r}
Return

#Persistent
SetTimer, PressTheKey, 600
Return

PressTheKey:
Send, {f}
Return

#Persistent
SetTimer, PressTheKey, 600
Return

PressTheKey:
Send, {f}
Return

#p::Pause
into one script without it giving me a duplicate error. Thank you in advance. :)
Mod edit: Added code tags.

Re: Combining three scripts into one exe

Posted: 28 Jun 2017, 14:56
by Riki81

Code: Select all

#Persistent

a:=A_TickCount
b:=A_TickCount
Loop
{
	if (A_TickCount-a > 600)
	{
		Send, {f}
		Send, {f}
		a:=A_TickCount
	}
	Sleep, 20
	if (A_TickCount-b > 6000)
	{
		Send, {r}
		b:=A_TickCount
	}
}

#p::Pause