Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web2Image
#16
Strange, the following code, the link to qm is OK, invalid for other links

Can provide the easiest way to intercept the entire page of a link and save it as a PNG image? 
Smile


Macro Macro16
Code:
Copy      Help
HtmlDoc d.SetOptions(2)
;d.InitFromWeb("http://www.quickmacros.com/") ;; ok
d.InitFromWeb("https://www.msn.cn/zh-cn") ;;not ok

__MemBmp b.Create(1000 1000)

MSHTML.IHTMLElementRender r=+d.d.body
MSHTML._RemotableHandle* workaround=+b.dc ;;DrawToDC is declared incorrectly in the type library
r.DrawToDC(workaround)

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)