Share this post

Link to post

Share on other sites

Melba23 2,661

Melba23 2,661

To the best of my knowledge, AutoIt arrays are inherently dynamic in the sense that the values within a declared array can be updated any time you wish to any value you require without problem, and without affecting the number of elements.

From the Help file:

Data types in Arrays

It was said that an Array contains only one datatype of the same type. But technically speaking, a Variant in AutoIt can contain anything from a number to a boolean value. So an AutoIt-Array could also contain different types, even other Arrays:

$Array[0]=1

$Array[1]=true

$Array[2]="Text"

$Array[3]=$AnotherArray

This has not been strictly forbidden in AutoIt. However, it is NOT ADVISABLE to mix different datatypes in an Array.

If you do need to change the number of elements, Dim or ReDim are the functions to use - the latter preserves existing values within surviving elements. Additionally, the include file Array.au3 contains a whole bunch of interesting functions to add and delete elements from within code, but the functions tend to be quite slow if used within loops because of the ReDim calls that they use.

M23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

Share this post

Link to post

Share on other sites

Melba23 2,661

Melba23 2,661

In future, please do not necro-post in threads this old - that functionality has already been incorporated into AutoIt. Look for the Map datatype in the latest Beta versions.

M23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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