spyrorocks 1 Report post Posted September 8, 2006 OK, i made this utillity a few weeks ago and i use it a lot. Since i use it quite a bit, im gonna post it here for you guys to enjoy. What it does is allows you to grab the HTML colour code for any colour on your screen by dragging your mouse over the colour you want then freezing the display and copying it to your clipboard with a simple button.Commands:Push CTRL+F to freeze/Un-Freeze the colour display.Push "Copy Colour Code To Clipboard" to copy the selected colour code to your clipboard (Example: #00FF00)and thats pretty much it.Here is the code:expandcollapse popup#include<string.au3> #include <GUIConstants.au3> hotkeyset("^f", "freeze") $parent = GUICreate("Parent") $colour_pick = GUICreate("AutoColor", 305, 96, @desktopwidth - 307, @desktopheight - 20 - 130, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE), $parent) $current_colour = GUICtrlCreateLabel("", 6, 10, 87, 79) GUICtrlSetBkcolor(-1, 0xFFFFFF) GUICtrlCreateLabel("HTML Colour Code:", 106, 12, 102, 17) $text_colourcode = GUICtrlCreateInput("#FF00FF", 200, 10, 55, 21) $copy_toclip = GUICtrlCreateButton("Copy Colour Code To Clipboard", 96, 32, 175, 17, 0) GUICtrlSetFont(-1, 6, 400, 0, "MS Sans Serif") $status = GUICtrlCreateLabel("", 96, 62, 175, 17, $SS_CENTER) GUISetState(@SW_SHOW) global $freezing = 0 $colour = "" While 1 $nMsg = GUIGetMsg() if $nmsg = $GUI_EVENT_CLOSE then Exit if $nmsg = $copy_toclip then copyit() $mouse = MouseGetPos () if PixelGetcolor( $mouse[0] , $mouse[1] ) <> $colour and not $freezing then $mouse = MouseGetPos () $colour = PixelGetcolor( $mouse[0] , $mouse[1] ) GUICtrlSetBkcolor($current_colour, $colour) guictrlsetdata($text_colourcode, "#" & Hex($colour, 6)) endif WEnd func copyit() $colour = guictrlread($text_colourcode) if ClipPut ($colour) then guictrlsetdata($status, "Copyed "&$colour&" To ClipBoard") else guictrlsetdata($status, "Error Coping colourcode to clipboard.") endif endfunc func freeze() if $freezing then global $freezing = 0 guictrlsetdata($status, "Freeze Off") else global $freezing = 1 guictrlsetdata($status, "Freeze On") endif endfunc [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Share this post Link to post Share on other sites
cppman 1 Report post Posted September 9, 2006 Nice, this will come very useful(to me atleast. lol) Miva OS Project Share this post Link to post Share on other sites
Valuater 107 Report post Posted September 9, 2006 kinda made one similar beforehttp://www.autoitscript.com/forum/index.ph...=16789&hl=#8) Share this post Link to post Share on other sites
spyrorocks 1 Report post Posted September 9, 2006 Oh yeah. well, as long as someone likes it i guess it was worth posting. [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Share this post Link to post Share on other sites