I am looking to build an array of mouse click coordinates. I'm struggling to understand how you build out a two-dimensional array. Or if I'm going about this wrong and should build two arrays. One with X-coordinates and one with Y-coordinates.
I can easily build out an array with just X coordinates or just Y-coordinates. Can I somehow build out X and Y into the same 2-D array?
ArrayX := []
ArrayY := []
counter:=1
^Lbutton::
MouseGetPos CurX, CurY
ArrayX[counter] := CurX
ArrayY[counter] := CurY
counter++
return
^q::
loop % ArrayX.MaxIndex()
items.= ArrayX[A_Index] ","
StringLeft, items, items, Strlen(items)-1
Clipboard := items
msgbox % items
items:=""
loop % ArrayY.MaxIndex()
items.= ArrayY[A_Index] ","
StringLeft, items, items, Strlen(items)-1
Clipboard := items
msgbox % items
exitapp