Here I can only get pixel and color from superimposed window with this function below
Код
--lua
local ffi = require("ffi")
local C = ffi.C
ffi.cdef[[ int GetDC(int hWnd);
int ReleaseDC(int hWnd, int hDC);
unsigned long GetPixel(int hdc, int x, int y); ]]
function getcolor(x, y, handle)
local HDC = C.GetDC (handle or 0)
local color=C.GetPixel(HDC, x, y)
C.ReleaseDC(handle or 0, HDC)
return color
So I wanted to know how to do the same with the code below, between positions startX, startY to endX, endY
Код
local d = findcolor ("1752, 133 1829, 133 (254)% arr 2")