FinalVersion Posted April 15, 2009 Share Posted April 15, 2009 Suggest anything you feel needed in this program, at the moment I have no new ideas for the program.Current Version: ReleaseAlways Check Last Post For Current Version! [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
corgano Posted April 15, 2009 Share Posted April 15, 2009 If you do mutiple grabs quickly, it returns the same value for all of them. Looking at it I was able to come up with this: HotKeySet("{F11}","grab") HotKeySet("{ESC}","foo") while 1 sleep(100) WEnd func grab() $pos = MouseGetPos() $pixel_hex = PixelGetColor($pos[0],$pos[1]) $pixel_dec = Dec($pixel_hex) MsgBox(0,"Retrieved",$pixel_dec) ToolTip($pixel_dec,$pos[0],$pos[1],"Result") Sleep(2000) ToolTip("") EndFunc Func foo() Exit EndFunc This code, no matter how fast you grab the pixel color, will always display the correct number and tooltip in the correct spot. ~corgano 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
FinalVersion Posted April 17, 2009 Author Share Posted April 17, 2009 If you do mutiple grabs quickly, it returns the same value for all of them. Looking at it I was able to come up with this: HotKeySet("{F11}","grab") HotKeySet("{ESC}","foo") while 1 sleep(100) WEnd func grab() $pos = MouseGetPos() $pixel_hex = PixelGetColor($pos[0],$pos[1]) $pixel_dec = Dec($pixel_hex) MsgBox(0,"Retrieved",$pixel_dec) ToolTip($pixel_dec,$pos[0],$pos[1],"Result") Sleep(2000) ToolTip("") EndFunc Func foo() Exit EndFunc This code, no matter how fast you grab the pixel color, will always display the correct number and tooltip in the correct spot. ~corganoYeah well it took 5mins to make the script if that. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
Hest Posted May 5, 2009 Share Posted May 5, 2009 I often use alot of different colors while making websites or playing around with pictures. I usually use something like paintshop to get the colorvalue and then copy/paste it, but I changes this script a little and made it, so I can just press F11 and the color is in the clipboard, ready for use expandcollapse popup#include <WindowsConstants.au3> #include <GUIConstants.au3> Global $pixel_last HotKeySet("{F11}","clip") HotKeySet("{ESC}","endme") #Region ### START Koda GUI section ### Form= $Pixelgrab_form = GUICreate("Color Grab", 177, 85, 797, 354) $font_group = GUICtrlCreateGroup("Color", 12, 8, 153, 65) $font_label = GUICtrlCreateLabel("Label1", 50, 32, 90, 21) GUICtrlSetFont(-1, 12, 800, 0, "Verdana") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 sleep(100) Call("grab") $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd func grab() $pos = MouseGetPos() $pixel_hex = Hex(PixelGetColor($pos[0],$pos[1]), 6) If $pixel_last <> $pixel_hex Then GUICtrlSetData($font_label, "#" & $pixel_hex) EndIf $pixel_last = $pixel_hex EndFunc Func clip() ClipPut ("#" & $pixel_last) EndFunc Func endme() Exit EndFunc Software:Model Train Calculator (Screen)Autoit3 beginner! Link to comment Share on other sites More sharing options...
nusaki Posted June 25, 2009 Share Posted June 25, 2009 here is lil update it shows u coordinates too . Great job nice program HotKeySet("{F11}","grab") HotKeySet("{ESC}","foo") while 1 sleep(100) WEnd func grab() $pos = MouseGetPos() $pixel_hex = PixelGetColor($pos[0],$pos[1]) $pixel_dec = Dec($pixel_hex) MsgBox(0,"Retrieved",$pixel_dec &" ("&$pos[0]&","&$pos[1]&")") ToolTip($pixel_dec,$pos[0],$pos[1],"Result") Sleep(2000) ToolTip("") EndFunc Func foo() Exit EndFunc keywen.com 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