Jump to content
Sign in to follow this  
systel

Click button in Internet Explorer

Recommended Posts

systel

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 by systel

Share this post


Link to post
Share on other sites
systel

link saved page: http://www.mediafire.com/?ya9w6ldqg180yaa

i need click yellow button

Share this post


Link to post
Share on other sites
systel

2? O_O

Ok..

Posted Image

Button: Построить

Share this post


Link to post
Share on other sites
Valik

Game automation. Read the rules. Thread locked.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.