Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ispressed - Spacebar
- ; returns color of center of named window
- #include <Misc.au3>
- Local $hDLL = DllOpen("user32.dll")
- While 1
- If _IsPressed("20", $hDLL) Then
- $hWnd = WinGetHandle("AutoIt Help") ; change to your window
- $Pos = WinGetPos($hWnd)
- $Color = PixelGetColor($Pos[0] / 2, $Pos[1] / 2)
- MsgBox(0, "", $Pos[0] & "," & $Pos[1] & @CRLF & "0x" & Hex($Color, 6))
- EndIf
- Sleep(250)
- WEnd
- DllClose($hDLL)
Advertisement
Add Comment
Please, Sign In to add comment