Показать полную графическую версию : [решено] Как симулировать нажатие этои кнопки ?
Здраствуйте.
Вот собственно кнопки "Сохранить" и "Отмена"
<div class="submit buttons">
<input type="submit" value="Сохранить" />
<input type="submit" name="cancel" value="Отмена" /> </div>
Делаю так
#include <IE.au3>
$oIE = _IECreate ("saitik.ru")
$oSubmit = _IEGetObjByName ($oIE, "Сохранить")
_IEAction ($oSubmit, "click")
_IELoadWait ($oIE)
И не работает :help:
Как сделать чтоб нажималось на кнопку сохранить ?
madmasles
23-06-2011, 10:50
Drsmog,
Попробуйте так:;...
$oInputs = _IETagNameGetCollection (http://dundats.mvps.org/help/html/libfunctions/_ietagnamegetcollection.htm)($oIE, 'input')
For (http://www.autoitscript.com/autoit3/docs/keywords.htm#For) $oInput In (http://www.autoitscript.com/autoit3/docs/keywords.htm#In) $oInputs
If (http://www.autoitscript.com/autoit3/docs/keywords.htm#If) $oInput.type == 'submit' And (http://www.autoitscript.com/autoit3/docs/keywords.htm#And) $oInput.value == 'Сохранить' Then (http://www.autoitscript.com/autoit3/docs/keywords.htm#Then)
_IEAction (http://dundats.mvps.org/help/html/libfunctions/_ieaction.htm)($oInput, 'click')
ExitLoop (http://www.autoitscript.com/autoit3/docs/keywords.htm#ExitLoop)
EndIf (http://www.autoitscript.com/autoit3/docs/keywords.htm#EndIf)
Next (http://www.autoitscript.com/autoit3/docs/keywords.htm#Next)
_IELoadWait (http://dundats.mvps.org/help/html/libfunctions/_ieloadwait.htm)($oIE)
;...
Или найдите форму, в которой это все находится и _IEFormSubmit ($oForm).
PS
Cимулируют болезнь. :)
Огромное спасибо :) Все работает :yahoo:
© OSzone.net 2001-2012
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.
Available in ZeroNet 1osznRoVratMCN3bFoFpR2pSV5c9z6sTC