Показать сообщение отдельно
  #8  
Старый 07.10.2012, 12:13
scroyler scroyler вне форума
Активный
 
Регистрация: 01.08.2011
Адрес: ЧЕбоксары
Сообщения: 248
Версия Delphi: XE
Репутация: -615
По умолчанию

а вот с такой кнопкой не пашет

Код:
<div style="position:absolute; margin-left: 6px; margin-top: 5px;">
								<a href="http://vk.com/club43631626" style="text-decoration:none;" target="_blank" onclick="slideUpDiv_130910();">
		<div class="universalButton_blue" style="width: 100px; ">  
			<p style="font-size: 13px; color: #FFFFFF; text-shadow: 0px 1px 2px #2a7398;">Подписаться</p>
		</div>
		</a>
							</div>

Код:
var
  Doc: IHTMLDocument2;
  Buttons: IHTMLElementCollection;
  Button: IHTMLElement;
  i: Integer;
begin
  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), 'Подписаться') then
    begin
      Button.click;
      Break;
    end;
  end;
end;
__________________
Ставь спасибо за спасибо!
Помог?Ставь спасибо!Увидел пост? Поставь спасибо!
Ответить с цитированием