How to define a 2D array Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
User avatar
Posts: 79
Joined: 01 Jun 2019, 08:47
Location: India

How to define a 2D array  Topic is solved

21 Oct 2019, 10:05


I was trying to work with 2D arrays in AHK, as I wasn't able to find a simple newb-friendly post, here it is.

Code: Select all

my_2D := [[1],[2],[3],[4],[5],[6]]
my_2D[1][1] := "a"
First define your matrix with the number of rows that you want, columns are not required as 2D is basically array of arrays.
Here I am using 6 rows, like this you can populate a 2D matrix.
Let me know if a similar post exists, I shall delete this in that case.

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 52 guests