Spoiler anzeigen
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Pixelfarbenfinder", 215, 102, 193, 115)
$Label1 = GUICtrlCreateLabel("", 6, 8, 209, 17)
$Label2 = GUICtrlCreateLabel("", 6, 25, 204, 40)
$Label3 = GUICtrlCreateLabel("", 6, 73, 209, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$PosOld = MouseGetPos ()
AdlibEnable ("_Pos",10)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _Pos()
$Pos = MouseGetPos()
If $PosOld[0] <> $Pos[0] OR $PosOld[1] <> $Pos[1] Then
$PosOld = $Pos
$Color = PixelGetColor ($Pos[0],$Pos[1])
$Color = "0x" & Hex ($Color,6)
GUICtrlSetData ($Label1,"X:" & $Pos[0] & " Y:" & $Pos[1])
GUICtrlSetBkColor ($Label2,$Color)
GUICtrlSetData ($Label3,"Farbcode:" & $Color)
EndIf
EndFunc