tan133 Posted October 11, 2009 Share Posted October 11, 2009 (edited) there is a test file like this: <html> <head><title>测试用</title></head> <table> <TBODY> <SPAN id=test><A href="http://1st.com">1stlink</A></SPAN> </TBODY> <TBODY id = main> <TH class=common> <SPAN id=test><A href="http://2nd.com">2ndlink</A></SPAN> </TH> </TBODY> </table> </html> =========================================== i want to get collection of all links in the table and write a script like this: #include <IE.au3> $oIE = _IECreate (@ScriptDir&"\test.htm") $o_TBODYs = _IETagNameGetCollection($oIE,"a") For $o_a In $o_TBODYs $oLinks = _IELinkGetCollection ($o_A) For $oLink In $oLinks MsgBox(0, "Link Info", $oLink.outertext) Next Next _IEQuit($oIE) Edited October 11, 2009 by tan133 Link to comment Share on other sites More sharing options...
tan133 Posted October 11, 2009 Author Share Posted October 11, 2009 (edited) the script will show all links once when get a link so ,it will the msgbox 4 times (2*2) if write like this MsgBox(0, "Link Info", $o_a.document.links(0).href) it will msgbox the first link every time my question is : how to get all links in the table,and show them all 1by1 sorry to ask so simple a question i am a freshman here,and also a freshman of autoitscript anybody can give me a help? tks Edited October 11, 2009 by tan133 Link to comment Share on other sites More sharing options...
tan133 Posted October 15, 2009 Author Share Posted October 15, 2009 ok maybe question is not clear enough maybe it is too hard i give up if you have answer to this no need to give me ,3x 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