04-10-2020, 07:11 AM
I have modified the code to:
I also noticed I was using the wrong coordinates. I had the Client instead of the Window coordinates.
out
int hwnd=win("myWindow" "myWindow")
RECT r; r.left=59; r.top=298; r.right=120; r.bottom=301
ARRAY(int) a
RECT rw; GetWindowRect hwnd &rw; OffsetRect &r rw.left rw.top
if(!GetRectPixels(r a 1)) end "failed"
int row col
for row 0 a.len(2)
out "row %i" row
for col 0 a.len(1)
out F"row:{row} - col:{col} - 0x{a[col row]}"I also noticed I was using the wrong coordinates. I had the Client instead of the Window coordinates.
