Jump to content

Issue with _IETableGetCollection indexing


Kidney
 Share

Go to solution Solved by Gianni,

Recommended Posts

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
Link to comment
Share on other sites

  • Solution

: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:

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

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

Link to comment
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.

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...