Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Jan : Re: How to get content of browser window
| Subject: | Re: How to get content of browser window |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Mon, 29 Jan 2007 00:08:00 |
"Greg Bullock" <borlandng_at_tsppd.com> wrote in message
news:45bd7466$1@newsgroups.borland.com...
> I'm not even sure if Indy is the appropriate tool for this.
It is not.
> My user needs to be able to browse around a web site (with, say,
> IE or another browser) until he finds certain pages, then click a
button
> in my app to process the content of the currently-viewed web page.
Sample code for accessing the content of a WebBrowser control has been
posted many times before. Go to http://www.deja.com and search
through the newsgroup archives.
> I can imagine several ways to do this, but I'm not sure which one
> is best or even whether they'd work at all.
>
> (1) The app could query the user's browser window for the web page
content,
That is the most direct way to do it.
> (2) The app could query the user's browser window for the web page's
> URL, then download the content using TIdHTTP (I suppose)
A waste of bandwidth since the data has already been downloaded.
> (3) The app could provide it's own browser window so all it really
has
> to do is query itself for the content.
There is a TWebBrowser component available for that.
Gambit