gritts Posted November 4, 2010 Share Posted November 4, 2010 I am attempting to write somesimple code that has two purposes. One for learning sake and the other in hopes to pull updated stats from a web page to parse into a report. Following the examples included in the help file I was able to come up with the script below. However, when I run it, I get the message "$_IEStatus_InvalidObjectType". Am I missing an option or is there another step I should throw in to retrieve the data. #include <IE.au3> #include <Array.au3> $oIE = _IECreate ("<a href='http://www.theanimenetwork.com/Whats-On/Anime-Network-Video-on-Demand/ATT' class='bbc_url' title='External link' rel='external'>http://www.theanimenetwork.com/Whats-On/Anime-Network-Video-on-Demand/ATT</a>") $oTable = _IETableGetCollection ($oIE) $aTableData = _IETableWriteToArray ($oTable,True) _ArrayDisplay($aTableData)<br clear="all"> The array of data does not get displayed. Any suggestions? The URL is one I am using to test with. Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 4, 2010 Share Posted November 4, 2010 (edited) The forum is screwing with our code and AutoIt tags. Can you repost your code without the tags? Edited November 4, 2010 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
gritts Posted November 4, 2010 Author Share Posted November 4, 2010 (edited) Here is the code minus the tags...#include <IE.au3>#include <Array.au3>$oIE = _IECreate ("http://www.theanimenetwork.com/Whats-On/Anime-Network-Video-on-Demand/ATT")$oTable = _IETableGetCollection ($oIE)$aTableData = _IETableWriteToArray ($oTable,True)_ArrayDisplay($aTableData) Edited November 4, 2010 by gritts Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 4, 2010 Share Posted November 4, 2010 Your $oTable is a collection, not a single table object. To get a particular table by 0-based index, add the index to the parameters: $oTable = _IETableGetCollection($oIE, 0) ; 0 = first table index Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
gritts Posted November 4, 2010 Author Share Posted November 4, 2010 That got it exactly. Not sure why I was not thinking to use a 0 for the index value (had tried a 1 previously) To expand on this further, if I wanted to retrieve the table by its ID name ("ID = schedule" in this case), is there an approach I can use? My thought here is that if the page design was ever changed, the table name would likely remain the same where as the table index may change. Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 4, 2010 Share Posted November 4, 2010 Either _IEGetObjById() or _IEFormElementGetObjByName() (note 'name' and 'id' properties are both in the same namespace). See help file. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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