dickep Posted November 3, 2009 Share Posted November 3, 2009 I looked over this forum and found a different number of replies to how large you can have an array. However, my array SHOULD fit the "accepted" definition of size, but it does not. I have a "header" file with all the keywords for AutoIt - I am working on something and wanted them there. I broke them up into areas. However, a couple are over 350 elements (single dimension array). So, what can I do to stop the error message at compile time of "unterminated string" when it can't (or maybe won't) allow all the elements? I have attached the header file and it has the different arrays in it. Thanks. Oh, I do not WANT to split up the larger arrays, but that is one option I am looking at. However, splitting them up will cause me more work to do when doing a search for the element in the array(s).Au3Keywords2.h Link to comment Share on other sites More sharing options...
Developers Jos Posted November 3, 2009 Developers Share Posted November 3, 2009 From the helpfile:You can use up to 64 dimensions in an Array. The total number of entries cannot be greater than 2^24 (16 777 216). 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...
Moderators Melba23 Posted November 3, 2009 Moderators Share Posted November 3, 2009 (edited) dickep,Please post the code that gives you the error - your arrays are nowhere near too large.M23Edit: Got it! Your lines are over the max limit allowed. Help file: MAX_LINESIZE 4095 Maximum size for a line of script.Edit2: Do it like this:#include <Array.au3> $sFunctions = '"abs","acos","adlibdisable","adlibenable","asc","ascw","asin","assign","atan","autoitsetoption","autoitwingettitle","autoitwinsettitle","beep","binary","binarylen","binarymid","binarytostring","bitand","bitnot","bitor","bitrotate","bitshift","bitxor","blockinput","break","call","cdtray","ceiling","chr","chrw","clipget","clipput","consoleread","consolewrite","consolewriteerror","controlclick","controlcommand","controldisable","controlenable","controlfocus","controlgetfocus","controlgethandle","controlgetpos","controlgettext","controlhide","controllistview","controlmove","controlsend","controlsettext","controlshow","cos","dec","dircopy","dircreate","dirgetsize","dirmove","dirremove","dllcall","dllclose","dllopen","dllstructcreate","dllstructgetdata","dllstructgetptr","dllstructgetsize","dllstructsetdata","drivegetdrive","drivegetfilesystem","drivegetlabel","drivegetserial","drivegettype","drivemapadd","drivemapdel","drivemapget","drivesetlabel","drivespacefree","drivespacetotal","drivestatus","envget","envset","envupdate","eval","execute","exp","filechangedir","fileclose","filecopy","filecreatentfslink","filecreateshortcut","filedelete","fileexists","filefindfirstfile","filefindnextfile","filegetattrib","filegetlongname","filegetshortcut","filegetshortname","filegetsize","filegettime","filegetversion","fileinstall","filemove","fileopen","fileopendialog","fileread","filereadline","filerecycle","filerecycleempty","filesavedialog","fileselectfolder","filesetattrib","filesettime","filewrite","filewriteline","floor","ftpsetproxy","guicreate","guictrlcreateavi","guictrlcreatebutton","guictrlcreatecheckbox","guictrlcreatecombo","guictrlcreatecontextmenu","guictrlcreatedate","guictrlcreatedummy","guictrlcreateedit","guictrlcreategraphic","guictrlcreategroup","guictrlcreateicon","guictrlcreateinput","guictrlcreatelabel","guictrlcreatelist","guictrlcreatelistview","guictrlcreatelistviewitem","guictrlcreatemenu","guictrlcreatemenuitem","guictrlcreatemonthcal","guictrlcreateobj","guictrlcreatepic","guictrlcreateprogress","guictrlcreateradio","guictrlcreateslider","guictrlcreatetab","guictrlcreatetabitem","guictrlcreatetreeview","guictrlcreatetreeviewitem","guictrlcreateupdown","guictrldelete","guictrlgethandle","guictrlgetstate","guictrlread","guictrlrecvmsg","guictrlregisterlistviewsort","guictrlsendmsg","guictrlsendtodummy","guictrlsetbkcolor","guictrlsetcolor","guictrlsetcursor"' $sFunctions &= '"guictrlsetdata","guictrlsetfont","guictrlsetgraphic","guictrlsetimage","guictrlsetlimit","guictrlsetonevent","guictrlsetpos","guictrlsetresizing","guictrlsetstate","guictrlsetstyle","guictrlsettip","guidelete","guigetcursorinfo","guigetmsg","guigetstyle","guiregistermsg","guisetbkcolor","guisetcoord","guisetcursor","guisetfont","guisethelp","guiseticon","guisetonevent","guisetstate","guisetstyle","guistartgroup","guiswitch","hex","hotkeyset","hotkeyset","httpsetproxy","hwnd","inetget","inetgetsize","inidelete","iniread","inireadsection","inireadsectionnames","inirenamesection","iniwrite","iniwritesection","inputbox","int","isadmin","isarray","isbinary","isbool","isdeclared","isdllstruct","isfloat","ishwnd","isint","iskeyword","isnumber","isobj","isstring","log","memgetstats","mod","mouseclick","mouseclickdrag","mousedown","mousegetcursor","mousegetpos","mousemove","mouseup","mousewheel","msgbox","number","objcreate","objevent","objevent","objget","objname","opt","ping","pixelchecksum","pixelgetcolor","pixelsearch","pluginclose","pluginopen","processclose","processexists","processlist","processsetpriority","processwait","processwaitclose","progressoff","progresson","progressset","random","regdelete","regenumkey","regenumval","regread","regwrite","round","run","runasset","runwait","send","seterror","setextended","shellexecute","shellexecutewait","shutdown","sin","sleep","soundplay","soundsetwavevolume","splashimageon","splashoff","splashtexton","sqrt","srandom","statusbargettext","stderrread","stdinwrite","stdoutread","string","stringaddcr","stringcompare","stringformat","stringinstr","stringisalnum","stringisalpha","stringisascii","stringisdigit","stringisfloat","stringisint","stringislower","stringisspace","stringisupper","stringisxdigit","stringleft","stringlen","stringlower","stringmid","stringregexp","stringregexpreplace","stringreplace","stringright","stringsplit","stringstripcr","stringstripws","stringtobinary","stringtrimleft","stringtrimright","stringupper","tan","tcpaccept","tcpclosesocket","tcpconnect","tcplisten","tcpnametoip","tcprecv","tcpsend","tcpshutdown","tcpstartup","timerdiff","timerinit","tooltip","traycreateitem","traycreatemenu","traygetmsg","trayitemdelete","trayitemgethandle","trayitemgetstate","trayitemgettext","trayitemsetonevent","trayitemsetstate","trayitemsettext","traysetclick","trayseticon","traysetonevent","traysetpauseicon","traysetstate"' $sFunctions &= '"traysettooltip","traytip","ubound","udpbind","udpclosesocket","udpopen","udprecv","udpsend","udpshutdown","udpstartup","winactivate","winactive","winclose","winexists","winflash","wingetcaretpos","wingetclasslist","wingetclientsize","wingethandle","wingetpos","wingetprocess","wingetstate","wingettext","wingettitle","winkill","winlist","winmenuselectitem","winminimizeall","winminimizeallundo","winmove","winsetontop","winsetstate","winsettitle","winsettrans","winwait","winwaitactive","winwaitclose","winwaitnotactive"' Global $aFunctions = StringSplit($sFunctions, ",", 2) _ArrayDisplay($aFunctions)The include file is just so _ArrayDisplay works.M23 Edited November 3, 2009 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
dickep Posted November 3, 2009 Author Share Posted November 3, 2009 M23, Using your method, it works fine. However, I have put this into a self generated file that will be read. It should be updated with each release of autoit (one would hope). So, not sure if I have a character in the wrong place, or what. Did you try to cut and paste into a script the first array? I did that and it fails with "unterminated string" in the line of the include file. Not sure what is wrong. Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 3, 2009 Share Posted November 3, 2009 Melba already said what the problem was. Your lines of code are too long. Link to comment Share on other sites More sharing options...
dickep Posted November 3, 2009 Author Share Posted November 3, 2009 Yep, he did. Need to get my eyes (and head) checked. I will have to change the way I want to input the array of values, but that is now easy. Thanks and sorry for the other reply - just me being DUMB and you guys being SMART! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 3, 2009 Moderators Share Posted November 3, 2009 dickep,As I said above:Your lines are over the max limit allowed. Help file: MAX_LINESIZE 4095 Maximum size for a line of script.This limit is almost certainly happening in mid-word, so all the compiler sees is that there is no final quote and the poor thing throws an error.As I suggested the solution is to break up the long lines into smaller ones and use concatenation to get a long string which is permissible (from that under-used Help file again )Maximum string length: 2,147,483,647 charactersSo you will have to rewrite your generation code to limit the lines to below 4095!M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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