Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web2Image
#14
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.
Heart


Macro Macro8
Code:
Copy      Help
;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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)