Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <WinAPI.au3>
- #include <Color.au3>
- #include <WinAPIGdi.au3>
- Func WindowColorGet($Handle, $x, $y, $Color, $shade = 20)
- Local $GDC = _WinAPI_GetWindowDC($Handle)
- $iColor = "0x" & HEX(_WinAPI_GetPixel($GDC, $x, $y))
- if IsArray(_ColorGetRGB($iColor)) and IsArray(_ColorGetRGB($Color)) Then
- $RGBS = _ColorGetRGB($iColor)
- $RGB = _ColorGetRGB($Color)
- ;~ MsgBox(0,"",$iColor)
- Else
- Return False
- EndIf
- _WinAPI_ReleaseDC(0,$GDC)
- If Abs($RGB[0] - $RGBS[0]) <= $shade And Abs($RGB[1] - $RGBS[1]) <= $shade And Abs($RGB[2] - $RGBS[2]) <= $shade Then
- Return True
- EndIf
- Return False
- EndFunc
- Func WindowClick($Handle,$x, $y ,$mode = "left" ,$Count = 1)
- ;~ $y = $y - 40
- ControlClick($Handle, "", "", $mode ,$Count ,$x, $y)
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement