gimx Posted December 13, 2007 Posted December 13, 2007 (edited) 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 : 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 December 13, 2007 by gimx
Skruge Posted December 13, 2007 Posted December 13, 2007 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 NextIf 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]
gimx Posted December 13, 2007 Author Posted December 13, 2007 Yes you understand Sorry, poor english here Thx for help, i don't know Ubound, i go to see help.
gimx Posted December 13, 2007 Author Posted December 13, 2007 Another question plz : Can i get collection by class (not id) ? Thx
PsaltyDS Posted December 13, 2007 Posted December 13, 2007 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
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