08-06-2017, 06:50 AM
Macro Macro2901
;step 1 - find small image and capture/save bigger image that is around the found rectangle.
;find small image. Code created with the 'Find image' dialog.
RECT r
int w=win("Firefox" "MozillaWindowClass")
scan "image:h9879DFA1" w r 2|16|128
;resize the found rectangle
InflateRect &r 100 100 ;;instead you can simply adjust r like r.left-100; r.right+100...
;capture screen and save in bmp file
str bmpFile="$temp$\159.bmp"
if(!CaptureImageOnScreen(r.left r.top r.right-r.left r.bottom-r.top bmpFile)) end "failed"
;results
run bmpFile