Jump to content

Finding out the index of an IE button


Recommended Posts

Hey guys and girls

Basically, I just wanted to find out the index of a certain button or input in IE

Lets say, I have this:

#include <IE.au3>
$oIE = _IECreate()
_IENavigate($oIE, "www.google.com")
_ielinkclickbyindex ( $oIE , ??? )

How do I find out the index of an IE button? I need to put an index where the '???' is. I had a look on Autoit Window Info but couldn't find any index of buttons.

Please help!

I don't want to have to use trial and error.

Thanks

Any help is appreciated

-Matt Gibbard

Link to comment
Share on other sites

I don't think it's possible.. I used _IELinkGetCollection to check if Autoit was reading such kind of links.. as in this page with that code :

#include <IE.au3>
#include <Array.au3>
Dim $linklist[1000]
$oIE = _IECreate("http://www.htmlgoodies.com/tutorials/buttons/article.php/3478871")
$oLinks = _IELinkGetCollection ($oIE)
$iNumLinks = @extended
MsgBox(0, "Link Info", $iNumLinks & " links found")
$i=0
For $oLink In $oLinks
    $linklist[$i] = $oLink.href
    $i+=1
Next
_ArrayDisplay($linklist)

and it didn't find the link to page1.htm (the button link) which is between imagemap.html and forms.html

I think in the help of _IELinkClickByIndex it's said to do another way:

Not all elements that appear to be links actually are. It is common practice to attach onclick Javascript events to other DOM elements to simulate the behavior of links. To activate such elements, use "click" with _IEAction

Link to comment
Share on other sites

Hey guys and girls

Basically, I just wanted to find out the index of a certain button or input in IE

Lets say, I have this:

#include <IE.au3>
$oIE = _IECreate()
_IENavigate($oIE, "www.google.com")
_ielinkclickbyindex ( $oIE , ??? )

How do I find out the index of an IE button? I need to put an index where the '???' is. I had a look on Autoit Window Info but couldn't find any index of buttons.

Please help!

I don't want to have to use trial and error.

Thanks

Any help is appreciated

-Matt Gibbard

As above, it may not actually be a link. Load DebugBar on your IE and look at the "link" object you are trying to use.

:)

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...