Basicz Posted May 25, 2008 Share Posted May 25, 2008 (edited) Hi, now i'm learning about array.. in AutoIT Normally i use C language int digits[10]={1,2,3,4,5,6,7,8,9,10}; or char color[]="RED"; i'm not sure about to how write it correctly please have a look about it in AutoIt Local $stest[5] = ["test", "test2", "test3", "test4"] is it correct to create an array that have include data as test ,test2 .... Edited May 25, 2008 by Basicz [right]Sorry for my poor english(dictionary beside)[/right][center]Search before ask will helping the community of AutoIt.[/center][center]...seeking in the search forum and help-file's, with all the most answer's that i need. Hope for you too.[/center] Link to comment Share on other sites More sharing options...
newbiescripter Posted May 25, 2008 Share Posted May 25, 2008 In the helpfile under _ArrayCreate there is a greate example. Link to comment Share on other sites More sharing options...
Basicz Posted May 25, 2008 Author Share Posted May 25, 2008 I already search it but didn't find it Ohh i see in the change log file _ArrayCreate() documentation has been removed. The function is still present but may be removed at a later time. Scripts should be updated to use the array initialization syntax built into AutoIt. it seems it be removed .... [right]Sorry for my poor english(dictionary beside)[/right][center]Search before ask will helping the community of AutoIt.[/center][center]...seeking in the search forum and help-file's, with all the most answer's that i need. Hope for you too.[/center] Link to comment Share on other sites More sharing options...
Prophet Posted May 25, 2008 Share Posted May 25, 2008 This should help you allong the way #include <Array.au3> ; For _array functions ;Standard autoit way Dim $Array1[3]=[3, 7.5, "string"] _ArrayDisplay($Array1 , "windownname") ;With _ArrayAdd Dim $Array2[1]=["nr"] For $i =0 To 5 _ArrayAdd($Array2, $i) Next _ArrayDisplay($Array2 , "windownname") ;The unsuported _ArrayCreate, but this only works up to 25 members $Array3 = _ArrayCreate("string" , 1 , 5 , "string2") _ArrayDisplay($Array3 , "windownname") +==================================================================+| The Definition of Madness: Creating a GUI, with GUI automation scripts |+==================================================================+ Link to comment Share on other sites More sharing options...
Basicz Posted May 25, 2008 Author Share Posted May 25, 2008 @Prophet Wow... that help me much and that mean i'm write an array correctly.. Thank you very much to write an example and spend time for me very helpfull thank's [right]Sorry for my poor english(dictionary beside)[/right][center]Search before ask will helping the community of AutoIt.[/center][center]...seeking in the search forum and help-file's, with all the most answer's that i need. Hope for you too.[/center] Link to comment Share on other sites More sharing options...
Bowmore Posted May 25, 2008 Share Posted May 25, 2008 I already search it but didn't find it Ohh i see in the change log file _ArrayCreate() documentation has been removed. The function is still present but may be removed at a later time. Scripts should be updated to use the array initialization syntax built into AutoIt. it seems it be removed .... Here the info you require from the help file To initialize an array, specify the values for each element inside square brackets, separated by commas. For multiple dimensions, nest the initializers. You can specify fewer elements in the initializer than declared, but not more. Function calls can also be placed in the initializers of an array. If the function call returns an array, then the one array element will contain that returned array. Dim $Array1[12]=[3, 7.5, "string"], $array[5] = [8, 4, 5, 9, 1] Dim $Grid[2][4]=[["Paul", "Jim", "Richard", "Louis"], [485.44, 160.68, 275.16, 320.00]] Dim $Test[5] = [3, 1, StringSplit("Abe|Jack|Bobby|Marty", "|"), Cos(0)] "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
Basicz Posted May 25, 2008 Author Share Posted May 25, 2008 @Bowmore Thank's about help again Yeah much of advance array function are avaible but i'm newbie and search for basic's but i'm sure that the another very helpfull like _ArrayDisplay() much thank's [right]Sorry for my poor english(dictionary beside)[/right][center]Search before ask will helping the community of AutoIt.[/center][center]...seeking in the search forum and help-file's, with all the most answer's that i need. Hope for you too.[/center] Link to comment Share on other sites More sharing options...
Bowmore Posted May 25, 2008 Share Posted May 25, 2008 @BowmoreThank's about help againYeah much of advance array function are avaiblebut i'm newbie and search for basic's but i'm sure that the another very helpfull like _ArrayDisplay() much thank'sGlad to help.We were all newbies once "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook 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