I've been doing some work on automatic profile switching as well as checking for open windows and I've stumbled onto something that may be a bug. My understanding is that the auto profile switching is always checking if the active window title equals certain text (non-case sensitive), and that the {WINDOWEXISTS:} token tells whether or not a window with particular text exists.
Say I have a profile called MyProfile and I've enabled the global option for auto profile switching. Now say that within MyProfile I've enabled profile switching for the window "dogs" and I've enabled the option to execute the command MyCommand when the profile is loaded. MyCommand contains:
Set Text [MyWindowTitle] to 'dogs'
Write '[Blue] {WINDOWEXISTS:MyWIndowTitle}' to log
So my understanding is that any time a window called "dogs" is brought into focus MyProfile will load (if it isn't already activated) and MyCommand will immediately execute. Additionally MyCommand should output "1" to indicate that the window "dogs" indeed exists.
However, if I create a folder called "dogs" and then open it MyProfile does activate and MyCommand does execute but {WINDOWEXISTS:} returns "0". I've tried setting MyWindowTitle to "*dogs*" but the result is the same. I've checked through VoiceAttack's "Show window titles" option and VoiceAttack indeed outputs "dogs" to the event log when the "dogs" folder is activated.
Is this some kind of nuance with doing window checking with a folder instead of an application? Or is this behavior a bug?