Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
scan image in macro then compare to current screen
#2
Macro Macro2901
Code:
Copy      Help
;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


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)