Jump to content

Recommended Posts

Posted (edited)

I posted what it can do right here.

I put my name in it for fun. :lmao:

Oh, also, its my first successful GUI. :ph34r:

EDIT:

I rearranged where it displays the color in decimal, mouse position, all that stuff thats on it, so theres less space thats being used.

Tool_v1.zip

Edited by Psychokinesis
Posted

It's fine, but next time, include your source. Sometimes people will hesitate to open EXE's from new members.

Posted (edited)

Here it is.

#include <GuiConstants.au3>
GuiCreate("Tool", 102, 73)
WinSetOnTop("Tool", "", 1)
GuiCtrlCreateLabel("", 0, 36, 102, 21)
GuiCtrlCreateLabel("", 0, 0, 102, 11)
GuiCtrlCreateLabel("", 0, 11, 102, 11)
GuiCtrlCreateLabel("", 0, 22, 102, 11)
GUICtrlCreatePic("psy.bmp", 0, 56, 102, 17)
GuiSetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
$mouse = MouseGetPos()
$color = PixelGetColor( $mouse[0], $mouse [1])
GuiCtrlSetBkColor(3, $color)
GUICtrlSetData(4, "Dec - " & $color)
GUICtrlSetData(5, "Hex - " & Hex($color, 6))
GUICtrlSetData(6, "(" & $mouse[0] & ", " & $mouse[1] & ")")
If _IsPressed("7B") Then ClipPut("dec - " & $color & " Hex - " & Hex($color, 6) & " X: "& $mouse[0] & " Y:" & $mouse[1])
WEnd
WEnd

(This is the source code for the most recent version.)

Edited by Psychokinesis
Posted

I was bothered with the flickering. Now it only updates when the mouse has moved:

#include <GuiConstants.au3>
#include <Misc.au3>

Global $LastMouse[2], $mouse[2]

GuiCreate("Tool", 155, 73)
GuiCtrlCreateLabel("", 0, 16, 96, 40)
GuiCtrlCreateLabel("", 0, 0, 165, 16)
GuiCtrlCreateLabel("", 96, 16, 64, 16)
GUICtrlCreatePic("psy.bmp", 0, 56, 102, 17)
GuiSetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
    $LastMouse = $mouse
    $mouse = MouseGetPos()
    If ($mouse[0] <> $LastMouse[0]) OR ($mouse[1] <> $LastMouse[1]) Then
        $color = PixelGetColor( $mouse[0], $mouse [1])
        GuiCtrlSetBkColor(3, $color)
        GUICtrlSetData(4, "Dec - " & $color & " " & "Hex - " & Hex($color, 6))
        GUICtrlSetData(5, "(" & $mouse[0] & ", " & $mouse[1] & ")")
    EndIf
    If _IsPressed("7B") Then
        ClipPut($color & " " & Hex($color, 6) & " "& $mouse[0] & " " & $mouse[1])
    EndIf
WEnd

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...