kev51773 Posted July 4, 2006 Share Posted July 4, 2006 The autoit helpfile lists the array limits as Arrays: A maximum of 64 dimensions and/or a total of 16 million elements Yet I cant seem to use arrays larger than 21 items. I know that _ArrayCreate says it has a limit of 21 but as far as Im aware im not using _ArrayCreate. Im sure I'm missing something simple here.... Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 4, 2006 Share Posted July 4, 2006 HI, needs beta. I ran into that myself. Global $array[22] = ['', '1', '2' .... ] So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
MHz Posted July 4, 2006 Share Posted July 4, 2006 What is wrong with 3.1.1.0 and arrays above 21 elements, th.meger? Is this a UDF issue? I know of none. Link to comment Share on other sites More sharing options...
kev51773 Posted July 4, 2006 Author Share Posted July 4, 2006 What is wrong with 3.1.1.0 and arrays above 21 elements, th.meger?Is this a UDF issue? I know of none.So does that mean that it IS possible to use arrays larger than 21 items? Link to comment Share on other sites More sharing options...
Developers Jos Posted July 4, 2006 Developers Share Posted July 4, 2006 Yes ?! 15. What are the current technical limits of AutoIt v3?Here are details of the current technical limits of AutoIt. Please note that some of the limits are theoretical and you may run into performance or memory related problems before you reach the actual limit.Maximum length of a single script line: 4,095Maximum string length: 2,147,483,647 charactersNumber range (floating point): 1.7E308 to 1.7E+308 with 15-digit precisionNumber range (integers): 64-bit signed integerHexadecimal numbers: 32-bit signed integer (0x80000000 to 0x7FFFFFFF)Arrays: A maximum of 64 dimensions and/or a total of 16 million elementsMaximum depth of recursive function calls: 384 levels SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
kev51773 Posted July 4, 2006 Author Share Posted July 4, 2006 Yes ?! Thats what I quoted in my original post. I just wasnt sure if it was correct given the problems I'm having. Link to comment Share on other sites More sharing options...
MHz Posted July 4, 2006 Share Posted July 4, 2006 (edited) Yes ?! Sounds good to me, JdeB I know of no other bounds unless as specified witch is high enough to use for most?Edit:kev51773, perhaps time to show your problems? Edited July 4, 2006 by MHz Link to comment Share on other sites More sharing options...
kev51773 Posted July 4, 2006 Author Share Posted July 4, 2006 Sounds good to me, JdeB I know of no other bounds unless as specified witch is high enough to use for most?Edit:kev51773, perhaps time to show your problems? Link to comment Share on other sites More sharing options...
kev51773 Posted July 4, 2006 Author Share Posted July 4, 2006 You'll have to excuse my horribly messy code (or ignore it at least) expandcollapse popup#include <file.au3> #include <GUICONSTANTS.au3> #include <array.au3> #Include <process.au3> ;Initialize variables Global $GUIWidth Global $GUIHeight Global $a_csv Global $a_data[30] ;check for the existence of the csv file $s_Path = @ScriptDir & "\levels.csv" If FileExists($s_Path) Then Else MsgBox(4096,"", "levels.csv does not exist.") Exit EndIf ;Load csv here _FileReadToArray($s_Path, $a_csv) _ArraySort( $a_csv) $number = (_ArrayMax( $a_csv, 0, 1)-1) $GUIWidth = 400 $GUIHeight = 300 ;Create window GUICreate("EDITEDITEDITEDIT", $GUIWidth, $GUIHeight) ;Create a list box with level titles in it $levellist = GuiCtrlCreateList("", 5, 5, 390, 200) GUICtrlSetOnEvent($levellist, "NewItem") $a = 1 While $a <= $number $line = $a_csv[$a] $split = StringSplit($line, ';') For $i = 1 to $split[0] _ArrayAdd( $a_data, $split[$i]) Next ;GuiCtrlSetData(-1, $split[1]) $a = $a + 1 Wend _ArrayAdd( $a_data, "The End") $index = _ArrayBinarySearch ( $a_data, "The End" ); For $i = 1 to ($index -1) Step 3 GuiCtrlSetData($levellist, $a_data[$i]) Next ;Create the runcommand label GUICtrlCreateLabel ("Run Command", 5, 248, 80) ;Create the runcommand box $Runcommand = GUICtrlCreateInput("", 80, 245, 315, 20) $comments = GUICtrlCreateLabel ( "Comments", 5, 195, 390, 40 ) ;Create a "Run" button $Run_Btn = GUICtrlCreateButton("Run Level", 5, 270, 190, 25) GUICtrlSetOnEvent($Run_Btn, "RunGame") ;Create a "CANCEL" button $Cancel_Btn = GUICtrlCreateButton("Cancel", 205, 270, 190, 25) GUICtrlSetOnEvent($Cancel_Btn, "CLOSEClicked") ;Show window/Make the window visible GUISetState(@SW_SHOW) Opt("GUIOnEventMode", 1) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") Func CLOSEClicked() Exit EndFunc Func NewItem() $selected = GUICtrlRead ( $levellist ) For $i = 1 to ($index -1) Step 3 If $a_data[$i] = $selected Then GuiCtrlSetData($Runcommand, $a_data[($i + 1)]) GuiCtrlSetData($comments, $a_data[($i + 2)]) EndIf Next EndFunc Func RunGame() $rundir = FileGetShortName ( @scriptDir ) $run = $rundir & "\game\" & GUICtrlRead ( $Runcommand ) _RunDOS( $run ) EndFunc While 1 Sleep(1000) ; Idle around WEnd Basically It should parse a csv file, and provide a menu. It works fine until their are 21 entries. Thanks Link to comment Share on other sites More sharing options...
randallc Posted July 4, 2006 Share Posted July 4, 2006 Hi, Needs your csv too for a test run.. Randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
kev51773 Posted July 4, 2006 Author Share Posted July 4, 2006 (edited) Hi,Needs your csv too for a test run..Randallccsv can be anything really 3 columns separeated by semicolonsie1;2;34;5;67;8;910;11;12It seems to require one blank at the end Edited July 4, 2006 by kev51773 Link to comment Share on other sites More sharing options...
kev51773 Posted July 4, 2006 Author Share Posted July 4, 2006 Apologies guys, Ive just found some other major problems. Until Ive fixed them I cant really be sure if this issue is real. I'll post again when Ive ironed out my problems. Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 4, 2006 Share Posted July 4, 2006 What is wrong with 3.1.1.0 and arrays above 21 elements, th.meger?Is this a UDF issue? I know of none.Hi,nothing. But I tried to create an array with more than 21 elements and didn't know the right way to write it. I asked it quite a while ago in the support area. And nobody really could help me. But then Smoke_N helped out.So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
MHz Posted July 4, 2006 Share Posted July 4, 2006 nothing. But I tried to create an array with more than 21 elements and didn't know the right way to write it. I asked it quite a while ago in the support area. And nobody really could help me. But then Smoke_N helped out.No problem. Seems you had or have some issues with arrays yourself. If Smoke_N was able to help then good. We are always there for a fellow member if you ever need help . Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 4, 2006 Share Posted July 4, 2006 (edited) No problem. Seems you had or have some issues with arrays yourself. If Smoke_N was able to help then good. We are always there for a fellow member if you ever need help . Thanks, yeah I really HAD some issues, because it isn't/wasn't documented in the helpfile how to create an array bigger than 21 elements. I'd appreciate if somebody could amend the helpfile of _ArrayCreate with the typo ... Global $big_Array[25] = ['', '1', '2', '3' ... '23', '24'] .. to make it clear and easy. Just a thought. So long, Mega Edit :@MHz : Germany will revenge Australia tonight. (Soccer WM) Edited July 4, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
MHz Posted July 4, 2006 Share Posted July 4, 2006 Edit :@MHz : Germany will revenge Australia tonight. (Soccer WM)Ha, we will see. I see Remarks Arrays up to 21 elements are supported. so _ArrayCreate() looks to be obsolete with the next beta version release as what you showed with "Global $big_Array[25] = ['', '1', '2', '3' ... '23', '24']"? That was just a parameter limit with _ArrayCreate() and not an array limit at all. Duly noted. Yep, the way of using beta is definitely better . 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