Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : TWebBrowser multiple pages
| Subject: | TWebBrowser multiple pages |
| Posted by: | "Bob Bedford" (b..@bedford.com) |
| Date: | Thu, 1 Jun 2006 14:44:06 |
I've trying to get the content from a web page using a twebbrowser.
Now, starting at a certain given page, I want to follow some links of the
page.
My code is
FInternetExplorer.Navigate(edtURL.Text, EmptyParam, EmptyParam,EmptyParam,
EmptyParam);
then the code goes to the FInternetExplorerDocumentComplete event, where I
fill a TStringList with desired links.
Now, I'm stuck. How to navigate to such new links as I need to retrieve some
datas from there ? I try to do a Navigate again but nothing appends. I've
tried this code:
FInternetExplorer.Navigate(edtURL.Text, EmptyParam, EmptyParam,EmptyParam,
EmptyParam);
for I:=0 to pages.Count-1 do begin
while FInternetExplorer.ReadyState < READYSTATE_INTERACTIVE do
Application.ProcessMessages;
FInternetExplorer.Navigate(pages.Strings[I], EmptyParam,
EmptyParam,EmptyParam, EmptyParam);
end;
Showmessage('Process terminated');
As I've seen on a forum that it's the way to wait until the browser has
finished everything, but it doesn't work.
Sorry if the result is obvious, but I haven't done any delphi code for 2
years....
Bob