scooper Posted June 1, 2009 Share Posted June 1, 2009 (edited) 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 CODE$oLinks = _IELinkGetCollection ($oIE) $iNumLinks = @extended MsgBox(0, "Link Info", $iNumLinks & " links found") For $oLink In $oLinks MsgBox(0, "Link Info", $oLink.href) Next 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 June 4, 2009 by scooper Link to comment Share on other sites More sharing options...
Authenticity Posted June 1, 2009 Share Posted June 1, 2009 _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. Link to comment Share on other sites More sharing options...
scooper Posted June 1, 2009 Author Share Posted June 1, 2009 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 CODE_IELinkClickByIndex ($oIE, 12) $oLinks = _IELinkGetCollection ($oIE, 12) _IENavigate($oIE, $oLinks) thankyou again autoit is great Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now