Jump to content

ie click button


pcjunki
 Share

Recommended Posts

 how do I click on a button in ie?

I've looked and poked around the forums, tried all kinds of scripts, but still no luck

how do I launch a website, and click on a button?

here is the html code for the button I would like to click on

 

<header>
<button id="btnClickme">CLICKHERE</button> 
<div id="Clickme_menu" 
class="offscreen">
<div id="Clickme_menu_content">

</div>
</div>

 

Link to comment
Share on other sites

What forum searches have you done?  This has to be one of the most frequently asked questions here :)

Post what code you have attempted to use.

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

the second param of _iegetobjbyid should be the value of the id attribute, not "id"

"Clickme_menu_content"

The _ieaction first param should be your $botten.

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

you all are making my head spin, but I love learning

this is what I have, but still not working

 

#include <IE.au3>
Call("click")
Func click()
    Global $oIE = _IECreate("http://website.com/")
Local $oButs = _IETagNameGetCollection($oIE, "btnClickme")For $oBut 
In $oButs   If StringInStr($oBut.innertext, "CLICKHERE") Then 
_IEAction($oBut, "click")
Link to comment
Share on other sites

 

you all are making my head spin, but I love learning

this is what I have, but still not working

#include <IE.au3>
Call("click")
Func click()
    Global $oIE = _IECreate("http://website.com/")
Local $oButs = _IETagNameGetCollection($oIE, "btnClickme")For $oBut 
In $oButs   If StringInStr($oBut.innertext, "CLICKHERE") Then 
_IEAction($oBut, "click")

btnClickme remmber that in this must always the first word of a div, try 

#include <IE.au3>
Call("click")
Func click()
    Global $oIE = _IECreate("http://website.com/")
Local $oButs = _IETagNameGetCollection($oIE, "button")For $oBut 
In $oButs   If StringInStr($oBut.innertext, "CLICKHERE") Then 
_IEAction($oBut, "click")
Link to comment
Share on other sites

I'm getting this error now.

 

"C:\Program Files\AutoIt3\Include\IE.au3" (1787) : ==> No variable given for "Dim", "Local", "Global", "Struct" or "Const" statement.:
Func _IETagNameGetCollection(ByRef $o_object, $s_TagName, $i_index = -1)
Func _IETagNameGetCollection(ByRef $o_object, $s_TagNa^ ERROR

Link to comment
Share on other sites

I'm getting this error now.

 

"C:\Program Files\AutoIt3\Include\IE.au3" (1787) : ==> No variable given for "Dim", "Local", "Global", "Struct" or "Const" statement.:

Func _IETagNameGetCollection(ByRef $o_object, $s_TagName, $i_index = -1)

Func _IETagNameGetCollection(ByRef $o_object, $s_TagNa^ ERROR

forgot that you need to type "Next" at the end , try it agian

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...