I want to be able to search through multiple arrays and when the contents match the search item then store which array holds the search item and what position it is at. I thought the following would work:
Code: Select all
GetArray()
{
Global
GuiControlget, BK, pos
SQC := ""
loop, 50
{
if instr(AA[A_index], BKX) && instr(AA[A_index], BKY)
SQC := "AA[" A_index "]"
if SQC
break
}
test := SQC
msgbox, 4096, Square, %SQC%: %test%
}
I thought test would contain the value of the array but currently it is showing the same result as SQC. What have I done wrong? Ii I use:
Then, as expected, I get the contents of the array twice. Whatever I try I can't get
SQC to show the array and
test to show the contents of the array. Will someone please put me out of my misery as I've been at this for hours now. Thanks.