Kidney Posted December 3, 2013 Share Posted December 3, 2013 (edited) Having an issue understanding why this is happening. Local $oTable = _IETableGetCollection($oFrame, 0) For $i = 3 to 4 Local $oTable = _IETableGetCollection($oFrame, $i) Local $aTableData = _IETableWriteToArray($oTable, True) _ArrayDisplay($aTableData, $i) Next _ArrayDisplay($aTableData) I want the contents of table index of 4 but if i try to do it directly then it returns the wrong data. but thats not why im posting. Im trying to figure out why i get the right table data outside the loop but if i comment out the _ArrayDisplay inside the loop, i get the data contents of index 3 instead of index 4? i guess the other question is why i cant just call index 4 directly. Edited December 3, 2013 by Kidney Link to comment Share on other sites More sharing options...
Gianni Posted December 3, 2013 Share Posted December 3, 2013 what do you get with this? Local $oTable = _IETableGetCollection($oFrame) ConsoleWrite(@extended) Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Kidney Posted December 3, 2013 Author Share Posted December 3, 2013 I get 27 as an output Link to comment Share on other sites More sharing options...
Solution Gianni Posted December 3, 2013 Solution Share Posted December 3, 2013 the script seems ok maybe the tables within the frame are not still ready while you try to get it's content, (or asyncronous loading of data in the web page gives you wrong content) or maybe also the number of tables changes while page is loading. try to insert a longer delay before to referencing the frame.... Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Kidney Posted December 3, 2013 Author Share Posted December 3, 2013 the script seems ok maybe the tables within the frame are not still ready while you try to get it's content, (or asyncronous loading of data in the web page gives you wrong content) or maybe also the number of tables changes while page is loading. try to insert a longer delay before to referencing the frame.... ya I tried placing a LoadWait and then a sleep for a few seconds before it tries to get the table. the thing that doesn't make sense is that it works if I have the _ArrayDisplay inside the loop but it doesn't if I get rid of it. Link to comment Share on other sites More sharing options...
Kidney Posted December 4, 2013 Author Share Posted December 4, 2013 the script seems ok maybe the tables within the frame are not still ready while you try to get it's content, (or asyncronous loading of data in the web page gives you wrong content) or maybe also the number of tables changes while page is loading. try to insert a longer delay before to referencing the frame.... turns out you were right. I must have placed the Loadwait and sleep in the wrong areas. But I tried again and put them right before it tries to get the table and I got it to work just fine. 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