I’m trying to access a value in a nested array in Autoit, but I’m getting the out of range error message.
This is my code:
Func ThisFunction()
local $one[6] = [1, 2, 3, 4, 5, 6]
local $two[6] = [7, 8, 9, 10, 11, 12]
local $combined[2] = [$one, $two]
For $i = 0 to UBound($combined)-1
$result = SomeFunction ( $combined[$i] )
If $result Then
return $combined[$i][0]
EndIf
Next
EndFunc
Is there a way to access/return a specific index from the nested $combined array?
EDIT: I found a working solution, I don’t know if it’s good practice
For $i = 0 to UBound($combined)-1
$result = SomeFunction ( $combined[$i] )
If $result Then
local $temp = $combined[$i]
If IsArray($temp) Then
return $temp[0]
EndIf
EndIf
Next
1 Answer