Jump to content

A program names Tool.exe


Psychokinesis
 Share

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...