Sign in to follow this  
Followers 0
Kidney

Issue with _IETableGetCollection indexing

6 posts in this topic

#1 ·  Posted (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 by Kidney

Share this post


Link to post
Share on other sites



I get 27 as an output

Share this post


Link to post
Share on other sites

:huh2: 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.... :think:


small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites

:huh2: 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.... :think:

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.

Share this post


Link to post
Share on other sites

:huh2: 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.... :think:

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0