Jump to content

Kind of simple, but can't find in help file?


 Share

Recommended Posts

I think you would need this:

$variable= PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )
If @error then
MsgBox (0, "Pixel Not Found", "Error, PixelColor was not found")
EndIf

:)

EDIT: It searches for the pixel color provided for the certain area given, and if it is found, it doesn nothing (You can make it do anything you want, this is just an example...), but if it doesn't find the pixel color provided, a MessageBox appears and states that the color was not found...Thats what you wanted right?

EDIT2: Here:

$variable= PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )
If @error then
MsgBox (0, "Pixel Not Found", "Error, PixelColor was not found")
If not @error then
 MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf

Now that will tell you if the pixels were found, it will tell you the coordinates where they were at. :)

EndIf

Edited by layer
FootbaG
Link to comment
Share on other sites

I think you would need this:

$variable= PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )
If @error then
MsgBox (0, "Pixel Not Found", "Error, PixelColor was not found")
EndIf

:)

<{POST_SNAPBACK}>

Thanks, so

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

;) If $varible = @error AND PixelGetColor(x,y) = 0xXXXXXX Then

would work?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...