dramaking 0 Posted August 15, 2010 Is it possible to create an array of struct? Share this post Link to post Share on other sites
Yashied 240 Posted August 15, 2010 Yes. My UDFs:iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL HelperAnimated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF LibraryAppropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignmentMore... Share this post Link to post Share on other sites
dramaking 0 Posted August 15, 2010 Could you please show an example? Thanks in advance. Share this post Link to post Share on other sites
MvGulik 86 Posted August 15, 2010 You might like to be more clear about the problem your having.To me It looks like you forgot to read the AutoIt Help file, Section "Array's" at the "Language Reference - Variables" page.( ... or => http://www.autoitscript.com/autoit3/docs/intro/lang_variables.htm ) "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)"Believing what you know ain't so" ...Knock Knock ... Share this post Link to post Share on other sites
dramaking 0 Posted August 15, 2010 I was trying to create an array of struct in a single statement this whole time and it gave me an error message. Fortunately, I came up with a solution: $a[2] For $k = 0 to 1 $[k] = DllStructCreate("int a; int b") Next Share this post Link to post Share on other sites
Tvern 11 Posted August 15, 2010 (edited) Fixed Local $a[2] ;Local $a[2] instead of $a[2] For $k = 0 to 1 $a[$k] = DllStructCreate("int a; int b") ;$a[$k] instead of $[k] Next P.S. This seems to work for a single statement? Local $a[2] = [DllStructCreate("int a; int b"),DllStructCreate("int a; int b")] Edited August 15, 2010 by Tvern Share this post Link to post Share on other sites
MvGulik 86 Posted August 15, 2010 (edited) Yep the "how to" create and fill a array with data in one command is missing from the that page. (hidden in Dim/Global/... page.)Dim $Array1[12]$Array1[0] = 3$Array1[1] = 7.5... etc.Or, all in one:Dim $Array1[12]=[3, 7.5, "string"], $array[5] = [8, 4, 5, 9, 1]Or in your case.dim $a[2]=[DllStructCreate("int a; int b"), DllStructCreate("int a; int b")] Edited August 15, 2010 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)"Believing what you know ain't so" ...Knock Knock ... Share this post Link to post Share on other sites
dramaking 0 Posted August 15, 2010 Thank you all so much. That helped. Share this post Link to post Share on other sites