What kind of string pattern does your regex aim to match, and what does the regex look like ?
Matches brackets [[^]]*] (this part already works)
What kind of names do the windows have ?
The other possible windows generally don't have brackets, hence my regex here's an example:
In this example, I want to track %WindowName%3%, Like That 0.2 [Like That] which is the project filename, so I can know, among other things, when a new file is opened. But sometimes it's window3 like above, sometimes 1 or 2 — it switches from moment to moment. If I can Set a Variable to window name matching [[^]]*], then it would allow me to search for that WindowName every time the focused window title changes (only Ableton windows of course), and know if a new file is opened.
If there's a way to flip through the windows, find which window matches [[^]]*], and put that window name in a variable, I think that would work.