Delta Posted June 24, 2007 Posted June 24, 2007 This afternoon my internet broke so I made a really random script to pass the time. All it does is search the pixels on your desktop and tells you how many of them are the color you picked. expandcollapse popup#include <GUIConstants.au3> $Gui = GUICreate("Pixel Color Count", 200, 200, 193, 115) $Label1 = GUICtrlCreateLabel("Target Color: ", 8, 16, 180, 17) $Label2 = GUICtrlCreateLabel("Color: ", 8, 40, 180, 17) $Label3 = GUICtrlCreateLabel("Progress: ", 8, 64, 180, 17) $Label4 = GUICtrlCreateLabel("Total: ", 8, 88, 180, 17) $Input1 = GUICtrlCreateInput("Color in Hex", 32, 128, 121, 21) $Button1 = GUICtrlCreateButton("Start", 56, 160, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Select Case $Msg = $GUI_EVENT_CLOSE Exit Case $Msg = $Button1 $targetcolor = GUICtrlRead($Input1) $total = 0 For $w = @DesktopWidth to 0 Step -1 For $h = @DesktopHeight to 0 Step -1 $Msg = GUIGetMsg() $color = PixelGetColor($w, $h) $Hcolor = hex($color, 6) GUICtrlSetData($Label1, "Target Color: " & $targetcolor) GUICtrlSetData($Label2, "Color: " & $Hcolor) GUICtrlSetData($Label3, "Progress: " & $w & $h) GUICtrlSetData($Label4, "Total: " & $total) Select Case $Hcolor = $targetcolor $total = $total + 1 Case $Msg = $GUI_EVENT_CLOSE Exit EndSelect Next Next MsgBox(0, "Total " & $targetcolor & " Pixels", $total) EndSelect WEnd [size="1"]Please stop confusing "how to" with "how do"[/size]
Paulie Posted June 24, 2007 Posted June 24, 2007 This afternoon my internet broke so I made a really random script to pass the time. All it does is search the pixels on your desktop and tells you how many of them are the color you picked. expandcollapse popup#include <GUIConstants.au3> $Gui = GUICreate("Pixel Color Count", 200, 200, 193, 115) $Label1 = GUICtrlCreateLabel("Target Color: ", 8, 16, 180, 17) $Label2 = GUICtrlCreateLabel("Color: ", 8, 40, 180, 17) $Label3 = GUICtrlCreateLabel("Progress: ", 8, 64, 180, 17) $Label4 = GUICtrlCreateLabel("Total: ", 8, 88, 180, 17) $Input1 = GUICtrlCreateInput("Color in Hex", 32, 128, 121, 21) $Button1 = GUICtrlCreateButton("Start", 56, 160, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Select Case $Msg = $GUI_EVENT_CLOSE Exit Case $Msg = $Button1 $targetcolor = GUICtrlRead($Input1) $total = 0 For $w = @DesktopWidth to 0 Step -1 For $h = @DesktopHeight to 0 Step -1 $Msg = GUIGetMsg() $color = PixelGetColor($w, $h) $Hcolor = hex($color, 6) GUICtrlSetData($Label1, "Target Color: " & $targetcolor) GUICtrlSetData($Label2, "Color: " & $Hcolor) GUICtrlSetData($Label3, "Progress: " & $w & $h) GUICtrlSetData($Label4, "Total: " & $total) Select Case $Hcolor = $targetcolor $total = $total + 1 Case $Msg = $GUI_EVENT_CLOSE Exit EndSelect Next Next MsgBox(0, "Total " & $targetcolor & " Pixels", $total) EndSelect WEnd Rofl! Thats pretty cool Nice I'll use this when my internet brokes
Mast3rpyr0 Posted June 25, 2007 Posted June 25, 2007 (edited) lol nice anotehr thing to do when im bored. POST 200 WOOT! Moving the mouse while doing this makes it go faster Edited June 25, 2007 by Mast3rpyr0 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here!
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