spymoon Posted September 10, 2007 Share Posted September 10, 2007 Hi all, I have problem with pixelgetcolor function to get color at game window. I can't get color, it always returns 0, either "AutoIT V3 window info" did. while "Winspector spy" work well. So do you know how "winspector spy" can get the color when AutoIt program could'nt. My code: HotKeySet("{end}", "Terminate") HotKeySet("{f1}", "Pixs") While 1 Sleep(100) WEnd Func Terminate() Exit 0 EndFunc Func Pixs() $pos = MouseGetPos() $pixie = PixelGetColor( $pos[0], $pos[1]) $color=Hex($pixie, 6) $red = StringMid($color, 1, 2) $green = StringMid($color, 3, 2) $blue = StringMid($color, 5, 2) $r = Dec($red) $g = Dec($green) $b = Dec($blue) if $pos[0] > @DesktopWidth - 210 then $pos[0] = @DesktopWidth -210 if $pos[1] > @DesktopHeight - 70 then $pos[1] = @DesktopHeight -70 if $pos[0] = @DesktopWidth -210 and $pos[1] = @DesktopHeight - 70 then $pos[0] = @DesktopWidth -215 *2 $pos[1] = @DesktopHeight -75 *2 endif SplashTextOn ( "Color Checker","Red ("&$r &") Green ("&$g &") Blue ("&$b & ")"&@CRLF &"Hex---> " & $color &@CRLF &"Dec---> " &$pixie, 195, 55,$pos[0] +15 ,$pos[1] +15, 5, "Tahoma",10) EndFunc Best regards, Link to comment Share on other sites More sharing options...
jokke Posted September 10, 2007 Share Posted September 10, 2007 AutoIt aint able to get color of a few games where pixelreading is blocked, some other tools might work as you said yourself. UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
ssubirias3 Posted September 10, 2007 Share Posted September 10, 2007 I can't get color, it always returns 0, either "AutoIT V3 window info" did. while "Winspector spy" work well. So do you know how "winspector spy" can get the color when AutoIt program could'nt.Where are you looking in AU3Info? I just did a quick comparison between the two programs (not within your game) and I see they both show the color correctly. What version AU3Info are you using? Where are you looking that you see Color:0? Where you need to look is under the Mouse tab and you'll see Color: 0xCC3333 which is the same thing as Winspector's Hex value: CC,33,33. Link to comment Share on other sites More sharing options...
spymoon Posted September 11, 2007 Author Share Posted September 11, 2007 Where are you looking in AU3Info? I just did a quick comparison between the two programs (not within your game) and I see they both show the color correctly. What version AU3Info are you using? Where are you looking that you see Color:0? Where you need to look is under the Mouse tab and you'll see Color: 0xCC3333 which is the same thing as Winspector's Hex value: CC,33,33. I use the latest version of AutoIt, the AU3Info work well with most of applications except my "Priston Tale" game. Winspector can retrieve pixel color, so it must have another way for AutoIt to do with getting pixel color but I don't know. So any body can help me , plz. Link to comment Share on other sites More sharing options...
crash748 Posted September 11, 2007 Share Posted September 11, 2007 (edited) I use the latest version of AutoIt, the AU3Info work well with most of applications except my "Priston Tale" game. Winspector can retrieve pixel color, so it must have another way for AutoIt to do with getting pixel color but I don't know. So any body can help me , plz.Maybe you can try do to a screenshot then find the pixel color in the fresh screenshot... Your screenshot will be have the same size X,Y then your game so mousepos will work to find the pixel coord. #include <A3LScreenCap.au3>;need Auto3Lib to be install ; Capture full screen in a file _ScreenCap_Capture("Image.jpg")oÝ÷ ÚÚºÚ"µÍÚ[ÛYH ÐLÓØÜY[Ø]LÉÝÎÛYY]]ÌÓXÈH[Ý[Ú[ÛYH ÐLÓÑTË]LÉÝÈÛYY]]ÌÓXÈH[Ý[ÈXZÙHØÜY[ÚÝ[Ù]H[HÙHØÜY[ÚÝÝÜH[Y[[ÜBÌÍÚ]XHÔØÜY[ØÐØJ BÈ[]X[^HÑJÈXBÑÑTÔÝ BÎÎÈÛÛYHÑJÈX[[][ÛÌÌÎÈ]HÛÌÎNÝÛÝÈÝÈÈÙ]H^[ÛÛÜÜY]ØÈÜÜÚXIÌÌÎÈÈÚ]ÝÛÑJÈXBÑÑTÔÚ]ÝÛ BÐTWÑ[]SØXÝ ÌÍÚ]X but i don't how to get the pixel color of a image GoodLuck Edited September 11, 2007 by crash748 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