Cliffy123 Posted July 7, 2011 Share Posted July 7, 2011 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 More sharing options...
taietel Posted July 7, 2011 Share Posted July 7, 2011 Welcome to the forum Cliffy123. Take a look here first. Something in your code led me to this: http://www.leagueoflegends.com/news/new-pvpnet-patcher-here Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
dexto Posted July 7, 2011 Share Posted July 7, 2011 Its working you just not sampling color right. Button changes color when you mouse is over it. Link to comment Share on other sites More sharing options...
Cliffy123 Posted July 8, 2011 Author Share Posted July 8, 2011 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 More sharing options...
rockets Posted July 8, 2011 Share Posted July 8, 2011 (edited) try if @error <> 1 then instead of If not @error Then Edited July 8, 2011 by rockets Link to comment Share on other sites More sharing options...
dexto Posted July 8, 2011 Share Posted July 8, 2011 (edited) Add to the top Opt("PixelCoordMode", 2) gg Add me at lol "nvn" Edited July 8, 2011 by dexto Link to comment Share on other sites More sharing options...
Cliffy123 Posted July 8, 2011 Author Share Posted July 8, 2011 Add to the top Opt("PixelCoordMode", 2) gg Add me at lol "nvn" This worked perfectly thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now