Hi,
I've a macro that deactivate a macro group so I type in Alfred without interfering in my Mail macro shortcuts. The deactivation works fine but I would like to activate it again when I finish typing/using in Alfred with enter or escape.
The first thing that jumps out at me is you have the AppleScript appending it's value to a variable...which probably doesn’t matter since it's a local variable, but try switching that to save to variable and try it again.
Also, values returned from AppleScripts sometimes appear to be "true" or "false" or whatever your naming convention is you use in the AppleScript itself, but I have seen enough examples of where there's an extra space or something in there that the Keyboard Maestro If action does not like the ìs condtiion; try switching that to contains and try that too.
One other thing to try is changing the key down to key pressed as sometimes if the key is down and up again very quickly (like usually happens when typing) Keyboard Maestro might not catch that.
EDIT: Also... it's pretty early morning in the US where a fair amount of the forum resides so be patient and i'm sure more will chime in soon once everybody gets up and moving.
Thanks noisneil. I've seen this macro already but since I'm not a developer I didn't find a way to merge the two. I believe it could work but I've lost some time trying it without success.
Ok my bad. I forgot how the macro is supposed to be set up. The above simplistic version may be enough for your needs, but if you want to use the full macro that accounts for double triggering, this is what you need to do:
Use the below macro instead of the previous version you downloaded.
Change your Alfred shortcut to ⌃⇧Space. Don't change the hotkeys in the macro.
Select your Mail.app group in the red and green actions.
Wow. Fantastic noisneil! Thank you. Tried a couple of times and it worked just fine.
I've also searched in Alfred forum and if do the following Alfred will behave as frontmost app when active:
"Launch Alfred's prefs to Appearance > Options (in the bottom left) and choose Focusing: Compatibility mode which makes Alfred behave like an app taking focus."
I have a similar problem with Mail's search feature. Since I use one key shortcuts in Mail it causes conflict when I use "search".
I've made a macro to disable temporarily a macro group and at the end enable it again with a key condition but it doesn't enable the macro as expected.