【发布时间】:2021-12-21 01:42:51
【问题描述】:
VBA Collection 对象的 Autoit 等效项是什么?
Dim CollArrays As New Collection 'VBA Collection
如何使用 Autoit 创建二维数组的集合?
添加更多细节。
#include <Array.au3>
_Example()
Func _Example()
Local $a_1[2][2] = [[0, 1], [2, 3]]
Local $a_2[2][2]= [[4, 5], [6, 7]]
Local $a_3[2][2]= [[8, 9], [10, 11]]
numRows = UBound($a_1(1), 1)
numCols = UBound(@a_2(1), 2)
Local $a_outer = [1 To (numRows*@a_outer.length)] [1 to numCols]
; get current $a_2
$a_2 = $a_outer[1]
; add element to $a_2
_ArrayAdd($a_2, 12, 13)
; put them back to $a_outer
$a_outer[1] = $a_2
EndFunc
MsgBox(0, "", _Example())
写入错误。
【问题讨论】:
-
你想做什么?您可以在 Autoit 中使用 Array.au3 和 _ArrayAdd 将项目添加到您的数组中。
-
外来生物学家,目标:将多个 2D 阵列组合成单个 2D 阵列。
-
_ArrayConcatenate ???
-
请注意,AutoIt-Arrays 能够保存数组(“数组数组”)
-
异种生物学家,需要在循环 For Each 中使用 _ArrayAdd 并使用 UBound 2D 数组。