Sign in to follow this  
Followers 0
Shyke

Pixel Checking

4 posts in this topic

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



#2 ·  Posted (edited)

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

#3 ·  Posted (edited)

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

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  
Followers 0