I'm always fighting with them can you tell me what's the easiest way to maintain a list of strings, add a listitem, remove a listitem, return a listitem? For example I'd like to keep a list of hidden window titles and then unhide one and remove it from the list. Autohotkey makes it really hard, I usually build a concatenated string and split them into an array but then when i want to return a value but am not sure where its position is it's near impossible.
I know this thread is a bit old, but here are a couple of threads you could take a look at from the AHK forums:SimpleArrayAHKArray
Also, for your initial problem, I'd first recommend working with window handles instead of window titles, but either way, you could use the native AHK string commands, which are pretty fast:
[copy or print
hiddenwindowlist = window 1,window 2,window 3,window 4,
MsgBox, % "The current list: " hiddenwindowlist
unhide( "window 3", hiddenwindowlist)
MsgBox, % "The new list: " hiddenwindowlist
unhide( wintitle_to_unhide, ByRef wlist )
If wintitle_to_unhide in %wlist% ; is wintitle_to_unhide in our list?
MsgBox, % "Unhiding " wintitle_to_unhide ; then show the window
StringReplace, wlist, wlist, %wintitle_to_unhide%`, ; and remove it from the list