Jump to content

IE Table to Array Help [solved]


Recommended Posts

Dear AutoIt Community,

Please help.

I'm working on getting a table from a website into an array using _IEFormGetCollection however I'm not sure how to find out the 'id' of the table from the webpage. I've checked for the form name in IE-Builder but I don't think it has one as it is without a "name" listed in the column in IE-Builder. However can I reference it from the index number in IE-Builder?

Also I need my script to read each row of the array and do different things with the data in each column. I'm fairly certain the best way to do this is to write a UDF and then tell the script to loop through the array and apply the UDF to each line's column.

I'm not certain how to do this. I think it should be easy enough to learn how to write a UDF but I'm not certain how to tell the UDF to read each column of x number row as a variable because the co-ordinates within the array will change as the UDF loops through. I'm thinking of a counter at the end of loop but maybe there is an easier way.

Do any of you have any ideas for these issues, do you happen to know of any tutorials, or do any of you have code snippets that I can learn from? I've looked through AutoIt help file, done a Google search, and checked the snippet database but I can't see anything I make heads or tails of (to create a working script). Maybe I'm not typing in the right keywords? 

I also was thinking of dumping the table array into an Excel file so I can be sure that the table has been written into the array properly and what the co-ordinates are for each row & column. I'm fairly certain I should be using _FileWriteFromArray for this—unless anyone knows of a better way? Also can anyone tell me how the co-ordinates in Excel relate to array variables. I'm assuming that A1 is something like $oArrayData[0][0] and B4 is $oArrayData[3][1]?

Thank you very much for your time and reply,

icu

Edited by icu
Link to comment
Share on other sites

Thank you JohnOne and Zedna,

I've ended up using _IETableGetCollection and experimenting with each table number until I found the correct table by using _ArrayDisplay.

As suggested I used _IETableWriteToArray after I correctly identified which table number I constantly wanted (it ended up being table number 5).

I still have unanswered questions from my original post but I think I asked too much in one post so I will post other specific questions in the forum.

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