Jump to content
Sign in to follow this  


Recommended Posts


hi all

i need to find the url of a link by index and then to navigate to it.

with this code i find all the url in a page

$oLinks = _IELinkGetCollection ($oIE)

$iNumLinks = @extended

MsgBox(0, "Link Info", $iNumLinks & " links found")

For $oLink In $oLinks

MsgBox(0, "Link Info", $oLink.href)


i know that my url is number 12 but i'm not able to write in _IENavigate($0IE, "the url number 12)), the url i need is always number 12 but change every time a call the page.

i tried in several ways but no one works

thanks in advance

Edited by scooper

Share this post

Link to post
Share on other sites

_IELinkGetCollection() has a second parameter to get a zero-based link from the collection, then you can use this link href to navigate, but that is already what _IELinkClickByIndex() does.

Share this post

Link to post
Share on other sites

thank you very much Authenticity

now it works

you solved my problem

the problem was when i use _IELinkClickByIndex() or imgbyclick(), i don't know why(maybe because is a frame site) the browser open me another page and when i tried to find forms and elements autoit gave me that in first page.

now using this code it works

_IELinkClickByIndex ($oIE, 12)

$oLinks = _IELinkGetCollection ($oIE, 12)

_IENavigate($oIE, $oLinks)

thankyou again

autoit is great :):party:

Share this post

Link to post
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
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.