Sign in to follow this  
Followers 0
koalaz2004

How to find the color of a pixel and click it?

5 posts in this topic

How to find the color of a pixel and click it? How would you find the color of a pixel or anything and have it click on it? Thank you for any help.

Share this post


Link to post
Share on other sites



How to find the color of a pixel and click it? How would you find the color of a pixel or anything and have it click on it? Thank you for any help.

Lookup PixelSearch and MouseClick in the help files.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

try...

$pixel = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0x000000); <=== change 0x000000 to any other RGB value for a different color to find
MouseClick("left",$pixel[0],$pixel[1],1,0)

Share this post


Link to post
Share on other sites

try...

$pixel = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0x000000); <=== change 0x000000 to any other RGB value for a different color to find
MouseClick("left",$pixel[0],$pixel[1],1,0)
That will return an error, you were close, just off a little bit

While 1
$pixel = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0x000000); <=== change 0x000000 to any other RGB value for a different color to find
If Not @Error then
MouseClick("left",$pixel[0],$pixel[1],1,0)
Endif
Wend

Share this post


Link to post
Share on other sites

try...

$pixel = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,0x000000); <=== change 0x000000 to any other RGB value for a different color to find
MouseClick("left",$pixel[0],$pixel[1],1,0)
Awesome thank you

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0