I am trying to find the coordinates of a specific color in a window.
The window itself is 1600x1024, and the color always shows up in the same spot.
The rectangle boundaries:
Top Left Corner: 55,270
Top Right Corner: 120,270
Bottom Left Corner: 55,275
Bottom Right Corner: 120,275
The specific color I am looking for is hex color 10EF21 or (R:16 G:239 B:33)
This is a screenshot of the area I am looking for:
[img]data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD0AAAAFCAYAAAD2S+QpAAAAI0lEQVQ4jWPg0Wn8P9IwA49O43+GV6YjBo96eqRguKdHGgYAuj9S3SYkA6kAAAAASUVORK5CYII=[/img]
The Macro currently spits out over 300k lines, and I can not find the color in the list at all.
Am I using RECT properly, or am I getting the information for a different area?
I need to know where the color 10EF21 starts (X), and where it ends (Y).
It should be only 61x5 pixels at most.
I am unsure if the screenshot is showing up properly, so I am linking it again here
out
int hwnd=win("MyWindow" "MyWindow")
RECT r; r.left=55; r.top=270; r.right=120; r.bottom=275
ARRAY(int) a
GetWindowRect hwnd &r
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 "0x%X" a[col row]
The window itself is 1600x1024, and the color always shows up in the same spot.
The rectangle boundaries:
Top Left Corner: 55,270
Top Right Corner: 120,270
Bottom Left Corner: 55,275
Bottom Right Corner: 120,275
The specific color I am looking for is hex color 10EF21 or (R:16 G:239 B:33)
This is a screenshot of the area I am looking for:
[img]data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD0AAAAFCAYAAAD2S+QpAAAAI0lEQVQ4jWPg0Wn8P9IwA49O43+GV6YjBo96eqRguKdHGgYAuj9S3SYkA6kAAAAASUVORK5CYII=[/img]
The Macro currently spits out over 300k lines, and I can not find the color in the list at all.
Am I using RECT properly, or am I getting the information for a different area?
I need to know where the color 10EF21 starts (X), and where it ends (Y).
It should be only 61x5 pixels at most.
I am unsure if the screenshot is showing up properly, so I am linking it again here