This is the error from the log:
Action 16398095 failed: Manipulate Window could not find any matching windows
The function of this macro is to hide all windows, except for two (if either or both exist). Uusually it works as expected, but other times it will fail and hide one or both of the windows it shouldn't. At first, I thought the problem was to do with a known issue with VSCode where VSCode fails to hide or minimise in response to the hot keys. Indeed, this was a problem and what would happen was Keyboard Maestro would reach VSCode, fail to hide it, and then end there leaving VSCode in front having only hidden whatever came before. But I was able to (I think) solve this with the while loop. I haven't had any issues specifically with VSCode not being hidden since adding that action, but I don't know if maybe it could still be causing something weird to happen. Or maybe it's my regex again (though I don't think so because I don't think this error happens when VSCode isn't open...I will test more explicitly and report back).
Hide all app windows.kmmacros (18.1 KB)