Jump to content

Recommended Posts

Posted

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.

Posted

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

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
Posted

Yea I get it :o 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.

Posted

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

Posted

Comes up with an error....A3 says that the Func statement is badly formatted

if you copied straight from forum, it probably broke the func line and the parameter line. the first line should be all the way to the ")"

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
×
×
  • Create New...