eyegeegeewhy Posted February 15, 2010 Share Posted February 15, 2010 Hi I am trying to get a list of the links (and eventually the XY coordinates) from a specific table. So far I have the below. The table I want the links from is the title menu at the top of the page. I am trying to make this generic so that it will work on on any page using this template (ie there could be more/less links in the table) I can find the correct table and list the text from it but i cant get a list of links in that object. Any help would be great thankyou #include <Array.au3> #include <IE.au3> $oIE = _IECreate ("http://truenorthtires5.ybsites.com/index.htm") $oTable = _IETableGetCollection ($oIE, 2) $aTableData = _IETableWriteToArray ($oTable) _ArrayDisplay($aTableData); have I got the right table $oLinks = _IELinkGetCollection ($oTable) $iNumLinks = @extended MsgBox(0, "Link Info", $iNumLinks & " links found") Link to comment Share on other sites More sharing options...
DaleHohm Posted February 15, 2010 Share Posted February 15, 2010 For $oLink in $oLinks ConsoleWrite($oLink.href & @CRLF) Next Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
eyegeegeewhy Posted February 15, 2010 Author Share Posted February 15, 2010 For $oLink in $oLinks ConsoleWrite($oLink.href & @CRLF) Next Dale Hi Thanks for the quick reply! That in conjunction with what I already have shows me all the links on the whole page. Im trying to get just the links from a particular table? Does that make sense ;-) Link to comment Share on other sites More sharing options...
DaleHohm Posted February 15, 2010 Share Posted February 15, 2010 Ah yes, _IELinkGetCollection scopes out to the document... replace $oLinks = _IELinkGetCollection ($oTable) with $oLinks = _IETagnameGetCollection($oTable, "a") Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
DaleHohm Posted February 15, 2010 Share Posted February 15, 2010 ok, but... the bottons in that menu do not use links... they use events triggered by Javascript... the destinations are defined in <script type=text/javascript src="/index.php?sid=4807&lang=en&dumpMenuJS=1&ext=intpage"></SCRIPT> DebugBar will help guide you... Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble 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