ConsultingJoe Posted April 24, 2006 Posted April 24, 2006 I want it to let me know when all 4 pixels are equal to the right colors and are in the right order I don't know how to do it. It would be a cool UDF to have. Any Ideas, Please help, Thanks Check out ConsultingJoe.com
Moderators big_daddy Posted April 24, 2006 Moderators Posted April 24, 2006 I want it to let me know when all 4 pixels are equal to the right colors and are in the right orderI don't know how to do it. It would be a cool UDF to have. Any Ideas, Please help, ThanksCould you not use PixelChecksum()?
ConsultingJoe Posted April 24, 2006 Author Posted April 24, 2006 Could you not use PixelChecksum()?no because that just tells me if there different, I need it to tell me if pixel 1=00ff00 2=33ff00 3=ff0000 and 4=000000 and if each is equal to that then output where this is Check out ConsultingJoe.com
Moderators SmOke_N Posted April 24, 2006 Moderators Posted April 24, 2006 (edited) no because that just tells me if there different, I need it to tell me if pixel 1=00ff00 2=33ff00 3=ff0000 and 4=000000 and if each is equal to that then output where this is2 For Loops, an $x and a $y.Opt('PixelCoordMode', 2) Local $xCoord[3] = ['', 344, 345], $yCoord[3] = ['', 5, 6], $Color[5] = ['', 0x00FF00, 0x33FF00, 0xFF0000, 0x000000] Local $Count = 0 For $x = 1 To 2 For $y = 1 To 2 $PixColor = PixelGetColor($xCoord[$x], $yCoord[$y]) For $iColorCount = 1 To 4 If ($PixColor == $Color[$iColorCount]) Then $Count += 1; Whatever your doing here ExitLoop EndIf Next Next Next MsgBox(0, 'Test', 'The Colors were found ' & $Count & ' Times') Edit I didn't notice you had 4 colors you were looking for... Put those in an array also. Edited April 24, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Moderators big_daddy Posted April 24, 2006 Moderators Posted April 24, 2006 This will work if the colors are always in the same order. Use this to record the 2x2 square of colors. Then use this to find what you recorded. Just modify it to do what you want after it finds it.
ConsultingJoe Posted April 25, 2006 Author Posted April 25, 2006 Thanks a lot guys, that was very helpful Check out ConsultingJoe.com
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