05-07-2019, 10:54 PM
Is there any new progress in webpage screenshots?
I need to save the entire page of a URL as a PNG image. I can only take a small part of it using the code below. I very much hope to continue to enhance and improve it. Thank you very much.
Macro Macro8
I need to save the entire page of a URL as a PNG image. I can only take a small part of it using the code below. I very much hope to continue to enhance and improve it. Thank you very much.

Macro Macro8
;http://www.quickmacros.com/forum/showthread.php?tid=6246&highlight=service
int w=win("- Internet Explorer" "IEFrame")
int c=child("" "Internet Explorer_Server" w)
Htm e=htm("BODY" "" "" c "0" 0 0x30)
MSHTML.IHTMLElement2 e2=+e.el
int wid(e2.scrollWidth) hei(e2.scrollHeight)
out F"{wid} {hei}"
;if has scrollbar, temporarily resize to show whole page; later restore; not implemented.
;RECT r; GetWindowRect(c &r)
;if wid>r.right-r.left or hei>r.bottom-r.top
,;...
__MemBmp b.Create(wid hei)
PrintWindow(c b.dc PW_CLIENTONLY)
;restore if resized
;...
str sFile.expandpath("$temp$\1.bmp")
SaveBitmap b.bm sFile
run sFile