Jump to content
Sign in to follow this  
gimx

Array

Recommended Posts

Hello,

I try to understand array example, but i have a question.

#include <IE.au3>

#include <Array.au3>

$oIE = _IE_Example ("table")

$oTable = _IETableGetCollection ($oIE, 1)

$aTableData = _IETableWriteToArray ($oTable, True)

_ArrayDisplay($aTableData)

This example give this result :

Posted Image

But i don't understand how we can extract column, row by row.

For example, i want the second row (row 1) in a new list where :

list[0]=column 0

list[1]= column 1

In this case, the result is :

list[0]=one

list[1]= two

Thx for help :)

Edited by gimx

Share this post


Link to post
Share on other sites

It's a two-dimensional array, so you reference the items like this:

For $Row = 0 To UBound($aTableData, 1) - 1
    For $Col = 0 To UBound($aTableData, 2) - 1
        ConsoleWrite("Row: " & $Row & " / Column: " & $Col & " = " & $aTableData[$Row][$Col] & @CRLF)
    Next
Next

If I understand your question correctly, you want the values $aTableData[1][0] and $aTableData[1][1].


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

Another question plz : Can i get collection by class (not id) ?

Thx :)

I don't know that DOM elements have CLASS, perhaps you mean _IETagNameGetCollection() which can retrieve all "input" or "td" elements, for example?

^_^


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  

×
×
  • Create New...