November Posted December 2, 2008 Share Posted December 2, 2008 Well, its nothing much, bur someone ask me to do that to capture some colors of some brands logo colors So i made this really simple script, i hope you enjoy. expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> HotKeySet("^!x" , "getcolor") HotKeySet("{ESC}" , "fexit") dim $vdif, $wdif, $r, $g, $b, $hex $main = GUICreate("Get RGB Color", 105, 35, @DesktopWidth - 145, @DesktopHeight - 95, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) $label = GUICtrlCreateLabel("", 15, 10, 80, 20, $SS_CENTER) GUISetState() while 1 $mouse = MouseGetPos() Select case $mouse[0] > @DesktopWidth - 60 And $mouse[1] < @DesktopHeight - 60 $wdif = -150 case $mouse[1] > @DesktopHeight - 60 And $mouse[0] < @DesktopWidth - 60 $vdif = -50 case $mouse[0] <= @DesktopWidth - 60 $wdif = 10 Case $mouse[1] <= @DesktopHeight - 60 $vdif = 40 case $mouse[0] > @DesktopHeight - 150 AND $mouse[1] > @DesktopHeight - 150 $vdif = -50 $wdif = -150 EndSelect $var = PixelGetColor( $mouse[0] , $mouse[1]) $background = GUICtrlSetBkColor($main, $var) GUISetBkColor($var, $main) middle() GUICtrlSetData($label, $R & ", " & $G & ", " & $B) ToolTip("ALT+CTRL+X (Get Color)" & @CRLF & "ESC (Exit Program)", $mouse[0] + $wdif, $mouse[1] + $vdif, "", 0, 0) $wdif = 5 $vdif = 0 Sleep(10) WEnd Func getcolor() $output = "" $hex = Hex ( $var , 6) $output = $output & "RGB Color : " & $R & ", " & $G & ", " & $B TrayTip("RGB Color", $output & @CRLF & "Copied to Clipboard", 1) ClipPut("R:"& $R & " G:" & $G & " B:" & $B) EndFunc func middle() $hex = Hex ( $var , 6) $HR = StringMid($hex, 1, 2) $HG = StringMid($hex, 3, 2) $HB = StringMid($hex, 5, 2) $R = Dec($HR) $G = Dec($HG) $B = Dec($HB) if $r <= 60 AND $g <= 60 AND $b <= 60 Then GUICtrlSetColor($label, 0xFFFFFF) if $r > 60 AND $g > 60 AND $b > 60 Then GUICtrlSetColor($label, 0x000000) EndFunc func fexit() Exit EndFunc Cheers Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
billthecreator Posted December 2, 2008 Share Posted December 2, 2008 Thats pretty cool. Nice work. [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
gseller Posted December 2, 2008 Share Posted December 2, 2008 Nice work November... Link to comment Share on other sites More sharing options...
A. Percy Posted December 2, 2008 Share Posted December 2, 2008 Gostei, foi um ótimo exemplo Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator VW Bug user Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral Link to comment Share on other sites More sharing options...
November Posted December 2, 2008 Author Share Posted December 2, 2008 Thats pretty cool. Nice work.Thank m8, this was a request, and when ideas are given, we work better Nice work November...Thank Gesller, I always try do do something different Gostei, foi um ótimo exemplo Obrigado A. Percy, volte sempre (É bom ouvir um bocado de Portugues neste forum de vez em quando ) Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
A. Percy Posted December 2, 2008 Share Posted December 2, 2008 Obrigado A. Percy, volte sempre (É bom ouvir um bocado de Portugues neste forum de vez em quando )Idem! Pode não ser o idioma mais usado no mundo, mas é um dos mais interessantes. Ou seja, somos privilegiados Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator VW Bug user Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral Link to comment Share on other sites More sharing options...
trancexx Posted December 2, 2008 Share Posted December 2, 2008 Yes, language is really great. Phonetically one of the most fascinating (to me anyway). ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
SoftVoile Posted December 2, 2008 Share Posted December 2, 2008 nice work, useful script, thanx Unresolved topics:1- Please help me in Editing or replacing a page in FireFox and IE.Please have a look at them. Link to comment Share on other sites More sharing options...
November Posted December 2, 2008 Author Share Posted December 2, 2008 Yes, language is really great. Phonetically one of the most fascinating (to me anyway).Thanx Trancexx,I always like to keep it simple... if i know how :)Cheersnice work, useful script, thanxYeah i think its a good script for marketing/webdesign... its was that departement Thanx m8 Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] 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