Цитата:
Сообщение от NumLock
у IHTMLElement метод click
|
пробывал так, но не получилось
Код:
var i:integer;s:string;mylink:olevariant;
Doc: IHTMLDocument2;
Buttons: IHTMLElementCollection;
Button: IHTMLElement;
begin
try
Doc := webbrowser1.Document as IHTMLDocument2;
Buttons := Doc.all.tags('BUTTON') as IHTMLElementCollection;
for i := 0 to Buttons.length - 1 do
begin
Button := Buttons.item(i, EmptyParam) as IHTMLElement;
if AnsiSameText(Trim(Button.innerText), 'Автоматически оставить коммент и заработать 1♥') then
begin
Button.click;
Break;
end; end;
except end;
end;