MrPook Posted July 24, 2007 Share Posted July 24, 2007 Hello, i'm using AutoIt and i need a way to have links between arrays. Let me explain : i've got a liste of stuff and each stuff has a list of stuff associated. I would like to navigate in this "tree" but the only way i figured out until now is creating a temp array for each first stuff. The problem is that i dont know how many first stuff i'll have, therefore i cant build temp arrays. Is there any solution to my prob ? (i saw help files but didnt find anything related, same with search option) Thanks in advance. Pook Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 24, 2007 Share Posted July 24, 2007 Hello,i'm using AutoIt and i need a way to have links between arrays.Let me explain : i've got a liste of stuff and each stuff has a list of stuff associated.I would like to navigate in this "tree" but the only way i figured out until now is creating a temp array for each first stuff.The problem is that i dont know how many first stuff i'll have, therefore i cant build temp arrays.Is there any solution to my prob ? (i saw help files but didnt find anything related, same with search option)Thanks in advance.PookYou need to provide more information. Multidimensional arrays (2D or 3D) might be an answer, or an "array-of-arrays", which can be dynamically sized by _ArrayAdd(), ReDim, etc.Since you call them "list of stuff", does that mean a simple 1D array will hold the data, or is it a 2D row/column arrangement? How many elements are you talking about -- tens, hundreds, thousands, tens-of-thousands?Will the data be read from/stored to a file, or dynamically created and used in memory only at each run time? 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 Link to comment Share on other sites More sharing options...
MrPook Posted July 24, 2007 Author Share Posted July 24, 2007 You need to provide more information. Multidimensional arrays (2D or 3D) might be an answer, or an "array-of-arrays", which can be dynamically sized by _ArrayAdd(), ReDim, etc. Since you call them "list of stuff", does that mean a simple 1D array will hold the data, or is it a 2D row/column arrangement? How many elements are you talking about -- tens, hundreds, thousands, tens-of-thousands? Will the data be read from/stored to a file, or dynamically created and used in memory only at each run time? Sorry for the "light" question. So here it is, it's a 2D array (matrix) like Dim $toto[1][1] i tried _ArrayAdd($toto,$etatDef) _ArrayAdd($toto,$etatDef) _ArrayAdd($toto[1],$text) _ArrayAdd($toto[2],$text1) _ArrayDisplay ( $toto[1], "TMP") _ArrayDisplay ( $toto, "TMP") but it doesn't work. In terms of size, it won't be more than 1000*1000, and will be stored in memory during the running of the program Thanks. Pook Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 24, 2007 Share Posted July 24, 2007 Sorry for the "light" question. So here it is, it's a 2D array (matrix) like Dim $toto[1][1] i tried _ArrayAdd($toto,$etatDef) _ArrayAdd($toto,$etatDef) _ArrayAdd($toto[1],$text) _ArrayAdd($toto[2],$text1) _ArrayDisplay ( $toto[1], "TMP") _ArrayDisplay ( $toto, "TMP") but it doesn't work. In terms of size, it won't be more than 1000*1000, and will be stored in memory during the running of the program Thanks. Pook That helps. _ArrayDisplay() and _ArraySort() have been updated to use 1D or 2D arrays, but sadly _ArrayAdd() has not. It's not hard to roll your own with ReDim though, and it has been done to death in other forum topics. 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 Link to comment Share on other sites More sharing options...
randallc Posted July 30, 2007 Share Posted July 30, 2007 Hi, Start iwth Array2D.au3 funcs in my sig? Best, randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW 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