Sign in to follow this  
Followers 0
systel

Click button in Internet Explorer

6 posts in this topic

#1 ·  Posted (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 by systel

Share this post


Link to post
Share on other sites



Show us the complete URL. Then we can help you.


My UDFs, Abbrevs and Snippets
If you like my post, just click the like button :) 

Share this post


Link to post
Share on other sites

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

i need click yellow button

Share this post


Link to post
Share on other sites

There are two yellow buttons. Which one?

Give exact button text.


My UDFs, Abbrevs and Snippets
If you like my post, just click the like button :) 

Share this post


Link to post
Share on other sites

2? O_O

Ok..

Posted Image

Button: Построить

Share this post


Link to post
Share on other sites

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  
Followers 0