Jump to content

PixelSearch Help


Recommended Posts

Hi,

I'm new to this forum and I'm trying to use PixelSearch but it doesn't seem to be working. I wanted to optimize it's performance by only searching 1 pixel. I used the Au3 Info tool to collect the exact color. When I search for it I can't find it. I also tried increasing the size of the box to the whole orange area I was searching for and I still couldn't find it. It couldn't locate a pixel of this color unless i changed the shade tolerance to 180. Here is my code:

Func playSearch()
    Local $orange = 0xAD5104
    Local $keepLooping = 1
    While $keepLooping = 1
        Sleep(100)

        ;Focus window
        $hWnd = ControlGetHandle("PVP.net Patcher", "", "")

        $coor = PixelSearch(650, 555, 652, 557, $orange, 10, 1, $hWnd)
        If not @error Then
           $keepLooping = 0

           ;click play
           ControlClick("", "", $hWnd, "", 1, $coor[0], $coor[1])
        Else
           MsgBox(1, "Nope", "You Fail", "", "")
            EndIf
    WEnd
EndFunc

The button does lite up when you cursor over it, but it is not lit up when the tool goes over and gets the color information, so I don't think it is that.

Any help would be greatly appreciated!

Thanks

Link to comment
Share on other sites

I am sampling right I'm pretty sure. I tried getting the sample when it was lite up and it did not work even with 255 shader leniency. The other set does work at a shade leniency of about 180ish but i would rather have it with less leniency as that is a lot. Can I get this to work or should i just set it to the high leniency and forget about it. Any help is greatly appreciated.

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