systel Posted May 1, 2012 Share Posted May 1, 2012 (edited) Hey. How i can release click on button in Autoit. Html code: ... <div class="actions"> <button class="button" type="button" onclick="Building.build(10000001, 14, '30');"> <center>Build</center> </button> </div> ... This don't worked: $oButtons = _IETagNameGetCollection($oIE, 'button') For $oButton In $oButtons If $oButton.classname == 'button' And $oButton.innertext == 'Build' Then _IEAction($oButton, 'click') _IELoadWait($oIE) EndIf Next And this not worked: #include <IE.au3> $oDivs=_IETagNameGetCollection($oIE, 'div') If Not @error Then For $oDiv In $oDivs $sPropDiv=_IEPropertyGet($oDiv, 'outerhtml') If Not @error Then If StringInStr($sPropDiv, 'button') And StringInStr($sPropDiv, 'Build') Then _IEAction($oDiv, 'click') ExitLoop EndIf EndIf Next EndIf ;~ 2 variant, $oBtns=_IETagNameGetCollection($oIE, 'button') If Not @error Then For $oBtn In $oBtns $sPropBtn=_IEPropertyGet($oBtn, 'outerhtml') If Not @error Then If StringInStr($sPropBtn, 'button') And StringInStr($sPropBtn, 'Build') Then _IEAction($oBtn, 'click') ExitLoop EndIf EndIf Next EndIf Please help Edited May 1, 2012 by systel Link to comment Share on other sites More sharing options...
Exit Posted May 1, 2012 Share Posted May 1, 2012 Show us the complete URL. Then we can help you. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
systel Posted May 2, 2012 Author Share Posted May 2, 2012 link saved page: http://www.mediafire.com/?ya9w6ldqg180yaa i need click yellow button Link to comment Share on other sites More sharing options...
Exit Posted May 2, 2012 Share Posted May 2, 2012 There are two yellow buttons. Which one? Give exact button text. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
systel Posted May 2, 2012 Author Share Posted May 2, 2012 2? O_OOk..Button: Построить Link to comment Share on other sites More sharing options...
Valik Posted May 3, 2012 Share Posted May 3, 2012 Game automation. Read the rules. Thread locked. Link to comment Share on other sites More sharing options...
Recommended Posts