"Steve Waring" <
[hidden email]> schrieb im Newsbeitrag
news:9rvl5v$vum04$
[hidden email]...
> It may be worth your while to have a look at the "Reusing the Browser"
> section [1] of MSDN. I could not see an interface which provides the same
> functionality as "save complete web page", but you may find what you need
in
> one of the Web Browser Services.
I think, there is no such interface, but you can write this function
yourself:
Create two folders to store your page, "your page" and "your page\images".
Get an IWebBrowser2 object and use
browser navigate: yourWebpage
to let it load the page you want to save. Wait for the DocumentComplete
event, then ask for all images:
imgCollection := browser document all tags: 'IMG'
This returns a collection you can enumerate:
0 to: imgCollection length - 1 do: [:index |
img := imgCollection item: index
Each image object has a src property which contains the image URL. I didn't
find a way to access the image data directly, so you probably have to use
that URL to request the image again and store it to "your page\images". Now
change the image src:
img src: 'your page\images\name.gif'
Eventually, save the modified HTML page as "index.html" to "your page". You
get the page source this way:
browser document documentElement outerHTML
bye
--
Stefan Matthias Aust // Truth Until Paradox