Page 1 of 1

Cick script

Posted: 22 Dec 2018, 03:40
by derpybaits
So what I wanted to do was have a script running at all times I needed it to look for a color on the screen lets say red and if that color shows up it clicks 3 times where I want it to. So far I have this but I can not get it to constantly be running and checking for the color unless I use a auto typer to keep hitting the f5 key.

F5::

{
PixelSearch, Px, Py, 90, 190, 1062, 621, 0x374D52, 0, Fast

if ErrorLevel
return
{
Click, 737 324
Sleep 20
Click, 777 359
sleep 20
Click, 777 394
}
}

any help would be appreciated greatly

Re: Cick script  Topic is solved

Posted: 22 Dec 2018, 05:08
by Rohwedder
Hallo,
try:

Code: Select all

F4::SetTimer F5,% (F5 := !F5) ? 500 : "Off" ;every 500ms, On/Off with key F4
F5::
PixelSearch, Px, Py, 90, 190, 1062, 621, 0x374D52, 0, Fast
if ErrorLevel
	return
{
	Click, 737 324
	Sleep 20
	Click, 777 359
	sleep 20
	Click, 777 394
}
Return

Re: Cick script

Posted: 22 Dec 2018, 05:46
by derpybaits
Rohwedder wrote:
22 Dec 2018, 05:08
Hallo,
try:

Code: Select all

F4::SetTimer F5,% (F5 := !F5) ? 500 : "Off" ;every 500ms, On/Off with key F4
F5::
PixelSearch, Px, Py, 90, 190, 1062, 621, 0x374D52, 0, Fast
if ErrorLevel
	return
{
	Click, 737 324
	Sleep 20
	Click, 777 359
	sleep 20
	Click, 777 394
}
Return

thank you that works perfect