I thought about merging this with
titlebarclock but decided its better ran seperately as some might not want this always displaying.
As the screenshot shows, it displays the current mouse coords and pixel color in the titlebar. Clicking the middle mouse button copies the RGB value to the clipboard ready for pasting whereever you need. Clicking on the tray icon pauses the script which is useful if you do not wish it to update for a while.
Code:
; pixelget - titlebar version
menu, tray, tip, pixelget
#SingleInstance force
Menu, Tray, NoStandard ; only use this menu
Menu, Tray, Click, 1 ; Remove this line if you prefer double-click vs. single-click.
Menu, Tray, Add, Pau&se, Pause
Menu, Tray, Default, Pau&se
Menu, Tray, Add, &Reload, Reload
Menu, Tray, Add, E&xit, Exit
Gui, +ToolWindow +AlwaysOnTop -SysMenu -Caption
Gui, Color, CCCCCC
Gui, Font, s8 wBold cBE7DFF, Terminal
Gui, Font, cBE7DFF
Gui, Add, Text, x3 y5, x
Gui, Font, cFF6428
Gui, Add , Text, x+0 y5 h17 w30 vCurrentX, %MouseX%
Gui, Font, cBE7DFF
Gui, Add, Text, x+0 y5, y
Gui, Font, cD77526
Gui, Add , Text, x+0 y5 h17 w30 vCurrentY, %MouseY%
Gui, Font, cBE7DFF
Gui, Add, Text, x+0 y5, c
Gui, Font, cFFA162
Gui, Add , Text, x+0 y5 h17 w65 vCurrentPixel, %color%
SetTimer, GetPixel, 100
Gui, Show, NoActivate x0 y0 h18 w200
WinSet, TransColor, CCCCCC 255, pixelget
GetPixel:
MouseGetPos, MouseX, MouseY
PixelGetColor, color, %MouseX%, %MouseY%, RGB
GuiControl, , CurrentX, %MouseX%
GuiControl, , CurrentY, %MouseY%
GuiControl, , CurrentPixel, %color%
WinSet, TransColor, CCCCCC 255, pixelget
Gui, Show, NoActivate x550 y0, pixelget
return
MButton::
ControlGetText, CopyText, Static6, pixelget
StringTrimLeft, CopyTextTrim, CopyText, 2
Clipboard = %CopyTextTrim%
Return
;______________________
; tray menu here
Pause:
suspend
pause
return
Reload:
reload
Exit:
exitapp