Cick script Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
derpybaits
Posts: 9
Joined: 22 Dec 2018, 03:14

Cick script

22 Dec 2018, 03:40

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
Rohwedder
Posts: 2552
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Cick script  Topic is solved

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
derpybaits
Posts: 9
Joined: 22 Dec 2018, 03:14

Re: Cick script

22 Dec 2018, 05:46

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

Return to “Ask For Help”

Who is online

Users browsing this forum: AHK_user, Bing [Bot], JnLlnd, MannyKSoSo and 51 guests