Script to auto move cursor to specific color and auto CLICK IT LIKE CRAZYYY

Ask gaming related questions (AHK v1.1 and older)
getalife34
Posts: 2
Joined: 21 Apr 2021, 08:02

Script to auto move cursor to specific color and auto CLICK IT LIKE CRAZYYY

Post by getalife34 » 21 Apr 2021, 08:13

Please guys I need your help :(

Im still a noob about scripting. So I want to make a script that can quickly auto move my cursor to specific color, and then LEFT CLICK IT.
Im very thankful if guys can help me to create the script.

-Thanks before
User avatar
mikeyww
Posts: 26945
Joined: 09 Sep 2014, 18:38

Re: Script to auto move cursor to specific color and auto CLICK IT LIKE CRAZYYY

Post by mikeyww » 21 Apr 2021, 09:04

Code: Select all

PixelSearch, x, y, 0, 0, 500, 500, 0xFFFFFF,, Fast
If !ErrorLevel
 MouseClick,, x, y
Explained: PixelSearchMouseClick
getalife34
Posts: 2
Joined: 21 Apr 2021, 08:02

Re: Script to auto move cursor to specific color and auto CLICK IT LIKE CRAZYYY

Post by getalife34 » 21 Apr 2021, 12:17

mikeyww wrote:
21 Apr 2021, 09:04

Code: Select all

PixelSearch, x, y, 0, 0, 500, 500, 0xFFFFFF,, Fast
If !ErrorLevel
 MouseClick,, x, y
Explained: PixelSearchMouseClick
Excuse me, Im really sorry but how to use it ? So the color I want to click is 0x00FF00, I've already change it anyway, but still not working, can you guide me please ?

This is my script anyway :

Code: Select all

!,::
PixelSearch, x, y, 0, 0, 500, 500, 0x00FF00,, Fast
If !ErrorLevel
 MouseClick,, x, y
return
User avatar
mikeyww
Posts: 26945
Joined: 09 Sep 2014, 18:38

Re: Script to auto move cursor to specific color and auto CLICK IT LIKE CRAZYYY

Post by mikeyww » 21 Apr 2021, 12:21

If you believe that the color exists in the specified range, use MouseMove to move to that individual coordinate, and PixelGetColor to find the color. Display the color so that you can confirm it. Display the ErrorLevel from the PixelSearch, to understand whether the search succeeded. My earlier post provides links to the documentation, which includes examples for each command.
Post Reply

Return to “Gaming Help (v1)”