nephilim Posted June 22, 2008 Posted June 22, 2008 CODE$Pos1 = PixelSearch(0+$pixelradius, 0+$pixelradius, @DesktopWidth-$pixelradius, @DesktopHeight-$pixelradius, 0xb21b1b, 8) If IsArray($Pos1) And hex(PixelGetColor($Pos1[0],$Pos1[1]+1),6) = "b21b1b" And (_IsPressed("02", $DllHandle) = 1) Then what I'm trying to do is to compare the 2 colors and make sure they are the same i know that at $Pos1 there is a variable of 8 what I'm trying to do is load that variable into PixelGetColor and make sure they are the same
Moderators SmOke_N Posted June 22, 2008 Moderators Posted June 22, 2008 You don't need the "hex" part or PixelGetColor. Since you are using PixelSearch, just get rid of the shade variation, and you'll always know it's the same. 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.
nephilim Posted June 22, 2008 Author Posted June 22, 2008 If IsArray($Pos1) And PixelGetColor($Pos1[0],$Pos1[1],6) = PixelGetColor($Pos1[0],$Pos1[1]+4,6) And (_IsPressed("02", $DllHandle) = 1) Then i worked it out you got to love this program for its simplicity basically its saying move 4 pixels in front and compare
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