Jump to content

Negative PixelSearch?HELP!


Recommended Posts

First off I want to say Hi to all :o (first post)

I was just creating some macro for wow (to make the char automatically login after your out of the queue)

so I used PixelSearch to make A3 finding the red area around the "change realm" button, but I dont want A3

to check if in the area is a red pixel. I want it to check if theres is NOT a red pixel.

Is this possible?

heres my example out of my script:

$coord = PixelSearch( 437, 418, 452, 427, 4719106, 10 )

Nayuu.

Link to comment
Share on other sites

First off I want to say Hi to all :o (first post)

I was just creating some macro for wow (to make the char automatically login after your out of the queue)

so I used PixelSearch to make A3 finding the red area around the "change realm" button, but I dont want A3

to check if in the area is a red pixel. I want it to check if theres is NOT a red pixel.

Is this possible?

heres my example out of my script:

$coord = PixelSearch( 437, 418, 452, 427, 4719106, 10 )

Nayuu.

you could just right your own... or i could write it for you... one sec...
Link to comment
Share on other sites

you could just right your own... or i could write it for you... one sec...

untested, but should do the trick..

Func NegPixelSearch($left=0,$top=0,$right=@DesktopWidth,$bottom=@DesktopHeight,$color, $step=1)
    Local $coords[2]
    $coords[0] = -1
    For $x= $left To $right Step $step
        for $y = $top To $bottom Step $step
            If PixelGetColor($x,$y) <> $color Then
                $coords[0] = $x
                $coords[1] = $y
                ExitLoop(2)
            EndIf
        Next
    Next
If $coords[0] = -1 Then
    Return(-1)
Else
    Return($coords)
EndFunc
Link to comment
Share on other sites

Yea I get it :geek: but you just confused me with "write your own" since i asked for it...if i would be able to write my own i wouldnt have asked for it.

Thanks.

technically you asked if there was a way, you didn't ask someone to just make one for you. if you had, i probably would not have done it.

:o

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...