hallo
ich kann mit folgendem code wunderbar die nächste webseite "ansurfen/aufrufen".
das mit dem webbrowser dauert nur so lange, kann man sowas schneller machen, evt. mit der idhttp-komponente?
Delphi-Quellcode:
procedure TForm1.NextPage;
var
Idx: Integer;
Document: IHTMLDocument2;
DocAll: IHTMLElementCollection;
DocElem: IHTMLElement;
begin
Document := webbrowser.Document
as IHTMLDocument2;
if Assigned(Document)
then
begin
DocAll := Document.All;
Idx := DocAll.length -1;
Hit := False;
while (Idx >= 0)
and (
not Hit)
do
begin
DocElem := DocAll.Item(Idx, '
')
as IHTMLElement;
if Pos('
Next', DocElem.innerText) <> 0
then
Hit := True
else
Dec(Idx);
end;
if Hit
then
begin
DocElem.Click;
while webbrowser.ReadyState <> READYSTATE_COMPLETE
do
Application.ProcessMessages;
end;
end;
end;
grüße
horst