Jump to content
Sign in to follow this  
Shyke

Pixel Checking

Recommended Posts

Shyke

For something that I want to do I have to get a script to check at position X=105 and Y=207 for the Hex color 0xFFFF00... how do I do that?

I have checked through the help file and I couldn't find anything unless I missed a part again.

Thanks in advance,

Shyke.

Share this post


Link to post
Share on other sites
AutoChris

For something that I want to do I have to get a script to check at position X=105 and Y=207 for the Hex color 0xFFFF00... how do I do that?

I have checked through the help file and I couldn't find anything unless I missed a part again.

Thanks in advance,

Shyke.

<{POST_SNAPBACK}>

It is indeed in the Help File under PixelSearch().

Example:
PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )

Edit...

Or you can do a $pixel = PixelGetColor() and do an If $pixel = 0xFFFF00 Then...

Edited by SerialKiller

Share this post


Link to post
Share on other sites
Shyke

Alright, thank-you very much for your help.

EDIT: Wait, how do I make the check inside of a specific window?

Like WinWaitActive("Window") or something else?

Edited by Shyke

Share this post


Link to post
Share on other sites
AutoChris

Alright, thank-you very much for your help.

EDIT: Wait, how do I make the check inside of a specific window?

Like WinWaitActive("Window") or something else?

<{POST_SNAPBACK}>

First, take a look at Opt("PixelCoordMode") ... Opt() also known as AutoItSetOption().

Then you can do a WinWaitActive(), and look for pixels based on the window or the desktop, depending on how you set your Opt(). You can also look at WinExists(), WinWait(), etc.

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.