luckyluke Posted June 16, 2008 Posted June 16, 2008 Hi, I use following code to get link on IE #include <IE.au3> $oIE = _IECreate ("") $oLinks = _IELinkGetCollection ($oIE) $iNumLinks = @extended MsgBox(0, "Link Info", $iNumLinks & " links found") For $oLink In $oLinks MsgBox(0, "Link Info", $oLink.href) Next And this is my question: 1. are there attribute of $oLink like $oLink.href? plz tell me 2. Suppose it found 19 link, how to click on 3rd link ? thanks
monoceres Posted June 16, 2008 Posted June 16, 2008 Hi, study this code. It answers both your questions. #include <IE.au3> $ie = _IECreate("www.google.com") $links = _IELinkGetCollection($ie) $count = 1 For $link In $links If $count = 3 Then MsgBox(0, $link.innerText, $link.href) _IELinkClickByText($ie, $link.innerText) ExitLoop EndIf $count += 1 Next Broken link? PM me and I'll send you the file!
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