Noobcube Posted July 29, 2009 Posted July 29, 2009 i wanna do PixelSearch( 713, 466, 713, 466, 0x55574D ) then i want if yes continue my script and if no wait 3 seconds and try again but i cant ever get search working no matter what colour code i put it continues i did pixel get colour on them exact co-ords and it said the colour 55574D can anyone help?
Izebize Posted July 29, 2009 Posted July 29, 2009 How did you get that pixel color? Default PixelGetColor gives you a decimal integer, you have to convert it to a 6 digit hex integer, if you want to use it as a hex. Here's a sample:Local $PixelColor = PixelGetColor(10, 10) ConsoleWrite("Default pixel color: " & $PixelColor & @CR) ConsoleWrite("Hex based pixel color: " & Hex($PixelColor,6) & @CR) Local $aTemp = PixelSearch(1, 1, 20, 20, $PixelColor) ConsoleWrite("PixelSearch X coord: " & $aTemp[0] &@CR) ConsoleWrite("PixelSearch Y coord: " & $aTemp[1] &@CR)
Noobcube Posted July 29, 2009 Author Posted July 29, 2009 i used the window info first, then the pixelsearch and it came up with 55574D and with the window info saying 0x55574D i guess put 0x there ^^
Izebize Posted July 29, 2009 Posted July 29, 2009 If you use the Window Info tool then you can just double click on Mouse/Color, and it will copy the value to the clipboard. I suggest the Freeze (Ctrl+Alt+F) mode, and use the "Finder Tool", it's much easier.
Noobcube Posted July 29, 2009 Author Posted July 29, 2009 i have the right colour, but the if part isnt working
Izebize Posted July 29, 2009 Posted July 29, 2009 Try this:#include <Array.au3> Local $aArray = PixelSearch(712, 465, 714, 467, 0x55574D) _ArrayDisplay($aArray)
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