J_Y_C Posted September 15, 2006 Share Posted September 15, 2006 I have used _IETableWriteToArray extensively in the past, but have never seen it exhibit this behavior. For some reason, it is taking the entire table, and squishing it into [0][0]. In doing so, it makes no delimiter between the first and second columns, so the data really isn't useful to me. For example, reading the main table on this page: http://www.cavsusa.com/cinet_home/search.php?Stitle_I=ALL Yields this as [0][0]: Total : 26077, Page : 1/1304 TitleArtistFormat CompanyListenAdd to Cart UNBREAK MY HEARTBRAXTON/ TONYMinus oneCAVS AFTER THE LOVINGHUMPERDINK/ ENGLEBERTMinus oneCAVS ALL ROUND THE WORLDSTANSFIELD/ LISAMinus oneCAVS ALL BY MYSELFDION/ CELIONMinus oneCAVS ALL I ASK OF YOUPHAMTOM OF THE OPERAMinus oneCAVS ALL MY LIFEK CI & JOJOMinus oneCAVS ALL THAT SHE WANTSACE OF BASEMinus oneCAVS ALL THE MAN THAT I NEEDHOUSTON/ WHITNEYMinus oneCAVS ALWAYS ON MY MINDNELSON/ WHILLIEMinus oneCAVS ANOTHER SAD LOVE SONGBRAXTON/ TONIMinus oneCAVS AS TIME GOES BYBENNETT/ TONYMinus oneCAVS BABY I NEED YOUR LOVINGFOUR TOPSMinus oneCAVS 1 2 3ESTEFAN/ GLORIAMinus oneCAVS BLUE BAYOURONSTADT/ LINDAMinus oneCAVS BY THE TIME I GET TO PHOENIXCAMPBELL/ GLENMinus oneCAVS DELILAHJONES/ TOMMinus oneCAVS DON'T KNOW MUCHRONSTADT/ L. NEVILLE/Minus oneCAVS DON'T CRY OUT LOUDMANCHESTER/ MELISSAMinus oneCAVS EARTH ANGELPENGUINSMinus oneCAVS EMBRACEABLE YOUCOLE/ NAT KINGMinus oneCAVS [1][2] [3] [4] [5] [6] [7] [8] ...[1304] [Next Page] Here is the code I am using: #include <IE.au3> $tmplst="e:\TestBin\CAVS\" $OF=FileOpen($tmplst&"list.txt",2) $site = "http://www.cavsusa.com/cinet_home/search.php?Stitle_I=ALL" $browser=_IECreate($site) $iNumTables = @extended ;The list is on table 7 $oTable = _IETableGetCollection ($browser, 6) $aTableData = _IETableWriteToArray ($oTable) FileWrite($OF,$aTableData[0][0]) FileClose($OF) Any suggestions other then having to read the raw HTML and parsing it out manually? The TableWritetoArray function has be invaluable to me, I would hate to have to use a work-around like that. Link to comment Share on other sites More sharing options...
DaleHohm Posted September 15, 2006 Share Posted September 15, 2006 Your tables are nested. You chose one layer too far out. use this one instead: $oTable = _IETableGetCollection ($browser, 7) 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...
J_Y_C Posted September 15, 2006 Author Share Posted September 15, 2006 Ah ha, thanks again Dale. I had tried iterating through the array from 0 to ubound of each dimension, and I still saw only the entire block of text, but I must have just iterated wrong. Thanks again, you are the dude. 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