Here is a working version of the example first post.
_PixelGetColor_Malkey
; #include <WinApi.au3> #include <Misc.au3> #include <ScreenCapture.au3> Local $hDll, $vDC, $vRegion, $aPos, $sColor, $colRGB $hDll = DllOpen("gdi32.dll") $vDC = _WinAPI_CreateCompatibleDC(0) $vRegion = _ScreenCapture_Capture("", 0, 0, @DesktopWidth, @DesktopHeight, False) _WinAPI_SelectObject($vDC, $vRegion) ; click left mouse button to exit While Not _IsPressed(0x01) $aPos = _PixelGetColor_MouseGetPos() $sColor = DllCall($hDll, "int", "GetPixel", "int", $vDC, "int", $aPos[0], "int", $aPos[1]) ; Added next line for RGB display $colRGB = "0x" & StringRegExpReplace(Hex($sColor[0], 6), "(.{2})(.{2})(.{2})", "\3\2\1") ToolTip("The color under your mouse is: " & $colRGB, $aPos[0] + 3, $aPos[1] + 3, "_PixelGetColor_GetPixel return", $hDll) WEnd _WinAPI_DeleteObject($vRegion) _WinAPI_ReleaseDC($vDC, $hDll) DllClose($hDll) Func _PixelGetColor_MouseGetPos() Return MouseGetPos() EndFunc ;==>_PixelGetColor_MouseGetPos ;





