11-26-2015, 08:24 AM
scan overwrites q. Set q before each scan call. Create a function, then will be less code.
Macro Macro2759
Macro Macro2759
;...
int w=win("Board editor • lichess.org - Mozilla Firefox")
sub.Scan(w "Pawn_White" WP) ;;Scan for the postions of the white pawns.
sub.Scan(w "Pawn_Black6" BP) ;;Scan for the postions of the black pawns.
;...
#sub Scan
function hwnd $image ARRAY(RECT)&a
RECT q ;;This rectengular will equal the dimensions and position of the chess board.
SetRect &q 500 225 1012 737
scan(F"$desktop$\lichess\{image}.bmp" hwnd q 1 20 a)