dramaking Posted August 15, 2010 Share Posted August 15, 2010 Is it possible to create an array of struct? Link to comment Share on other sites More sharing options...
Yashied Posted August 15, 2010 Share 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 Helper Animated 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 Library Appropriate 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 alignment More... Link to comment Share on other sites More sharing options...
dramaking Posted August 15, 2010 Author Share Posted August 15, 2010 Could you please show an example? Thanks in advance. Link to comment Share on other sites More sharing options...
MvGulik Posted August 15, 2010 Share 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 ... Link to comment Share on other sites More sharing options...
dramaking Posted August 15, 2010 Author Share 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 Link to comment Share on other sites More sharing options...
Tvern Posted August 15, 2010 Share 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 Link to comment Share on other sites More sharing options...
MvGulik Posted August 15, 2010 Share 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 ... Link to comment Share on other sites More sharing options...
dramaking Posted August 15, 2010 Author Share Posted August 15, 2010 Thank you all so much. That helped. 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