Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get Coordinates of Pixels with specific color
#3
I have modified the code to:
Code:
Copy      Help
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.


Messages In This Thread
RE: Get Coordinates of Pixels with specific color - by Darkblade - 04-10-2020, 07:11 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)