Jump to content
Sign in to follow this  
jimmys

Find colour on window or screen

Recommended Posts

jimmys

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
nf67

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
AdmiralAlkex

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
jimmys

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

Share this post


Link to post
Share on other sites
jimmys

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
jimmys

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
herewasplato

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.