Sypher Posted September 24, 2007 Share Posted September 24, 2007 (edited) Hi Folks,I am working on a little tool that automates some of the tasks i normally have to do by hand.The big problem is that i'm stuck at creating multidimensional arrays.Dim $ResultArrayoÝ÷ Ù«¢+Ù}ÉÉå%¹ÍÉÐ ÀÌØíIÍÕ±ÑÉÉä°À°}ÉÉå ÉÑ ÀÌØí±¥¹°ÀÌØí±¥¹¬°=ÙÉÉÕ±È ÀÌØí±¥¹¤¤¤The results of that is the following (made with _ArrayDisplayTree)It just crashes... I've tried lots of various code, but this is just pretty annoying The Array is created from within a for-loop that reads the RSS feed, and the data i like are being put in the array.The thing i am trying to do - but well, without $ResultArray[1][0] i can't do much - is to cross-match the array content with another array, and dump all the non-matching ones (think: watchlist).Anyhow, can anyone please point me in the good direction? Thanks! Edited September 24, 2007 by Sypher Link to comment Share on other sites More sharing options...
Paulie Posted September 24, 2007 Share Posted September 24, 2007 I think taking a look at ReDim could solve alot of your problems Dim $array[6] Msgbox(0,"1D","The array is: " &Ubound($array,0)&" dimension." ReDim $Array[6][6] Msgbox(0,"2D","The array is: " &Ubound($array,0)&" dimensions." Link to comment Share on other sites More sharing options...
randallc Posted September 25, 2007 Share Posted September 25, 2007 (edited) Hi, consider Array2d in my sig? eg ; arrayexampleinsert.au3 #include<array2D.au3> local $ar_Created2D[1][1],$asControls = StringSplit(WinGetClassList("", ""), @LF) _ArrayDisplay($asControls,"$asControls") local $arGrid[2][4] = [["Paul", "Jim", "Richard", "Louis"], [485.44, 160.68, 275.16, 320.00]] _ArrayDisplay($arGrid,"$arGrid") local $arGrid0[4] = ["Paul", "Jim", "Richard", "Louis"] _ArrayDisplay($arGrid0,"$arGrid0") local $arGrid1[4] = [485.44, 160.68, 275.16, 320.00] _ArrayDisplay($arGrid1,"$arGrid1") _ArrayInsert2D( $ar_Created2D, $arGrid0, 0) _ArrayInsert2D( $ar_Created2D, $arGrid1, 0) _ArrayDisplay($ar_Created2D,"$ar_Created2D")Best, randall Edited September 25, 2007 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
randallc Posted September 25, 2007 Share Posted September 25, 2007 (edited) Or even... ; arrayexampleinsert.au3 #include<array2D.au3> local $ar_Created2D[1][1],$arGrid0[4] = ["Paul", "Jim", "Richard", "Louis"] local $arGrid1[4] = [485.44, 160.68, 275.16, 320.00] local $arGrid2[4] = [1,2 ,3, 4] for $a=0 to 1 _ArrayInsert2D( $ar_Created2D, eval("arGrid"&$a), 0) _ArrayInsert2D( $ar_Created2D, eval("arGrid"&$a), 0) next _ArrayInsert2D( $ar_Created2D, $arGrid2, 2) _ArrayDisplay($ar_Created2D,"$ar_Created2D")Randall Edited September 25, 2007 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Sypher Posted September 25, 2007 Author Share Posted September 25, 2007 Thanks, the array2D inserting seems to be working $tempArr = _ArrayCreate($line, $link, Overruler($line)) _ArrayInsert2D ($ar_Created2D, $tempArr, 0) So Thanks! Now i can finally use $array[$x][1] etc Link to comment Share on other sites More sharing options...
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