Sign in to follow this  
Followers 0
jimmys

Find colour on window or screen

11 posts in this topic

Hey :P

How do i make it look for a colour on the whole screen and whenever it is present click on it.

Thanks

Share this post


Link to post
Share on other sites



PixelSearch is what you're looking for.

You can search for it in the helpfile or click here.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

PixelSearch is what you're looking for.

You can search for it in the helpfile or click here.

Please don't link to adminscripteditor.com they don't have the latest syntax/version, if you really need online documentation (and I can't understand why that would be), use the official instead Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

How do i find the Parameters? like the left coordinate of rectangle.

Share this post


Link to post
Share on other sites

ok i made this but its really slow and the thing its meant to click on is long gone by the time it clicks

HotKeySet("{END}","_exit")

Func _exit()

exit 0

EndFunc

While 1

$pixelsearch = Pixelsearch(0, 0, @Desktopwidth, @DesktopHeight, "0xE72262", 5)

If Not @error Then

MouseClick("left", $pixelsearch[0], $pixelsearch[1] )

Endif

Wend

Share this post


Link to post
Share on other sites

Nope not on vista how do i find the search area?

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

I put my mouse in each coner and got this

Top Left 170, 323

Bottom Left 170, 794

Top Right 802, 323

Bottom Right 802, 793

Sorry i'm not very good at this XD

Edited by jimmys

Share this post


Link to post
Share on other sites

I can never remember which numbers to use.

Try Top Left 170, 323 and Bottom Right 802, 793

$pixelsearch = Pixelsearch(170, 323, 802, 793, "0xE72262", 5)

I figured out which numbers to use once and wrote this script:

http://www.autoitscript.com/forum/index.php?showtopic=19722

...that is what I use anytime I need to wrote a PixelSearch line of code.


[size="1"][font="Arial"].[u].[/u][/font][/size]

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