This is sort of a reiteration of my post “How I limit which macros are listed by “macro by name””, provided now as a tutorial rather than an account of my musings on solving the challenge. I appreciated the responses to that post but this method has remained the one that works best for me.
This is quite a simple “hack” based on using a smart group such that active macros appear in the prompt only when their names contain a special character (for which I chose something that looks very much like a normal full stop). So, if you want a macro to appear in the prompt list when active, add the special character to its name; other macros will not appear in the list.
1) Set up a smart group that looks for a unique character in macro names
Create a smart group called (say) “Macro by Name”.
Set it to match name:
(that’s name:
followed by a space).
After the space, add a character that you would not normally encounter in the names of macros. For reasons detailed in the original post, I chose that character to be this: .
(fullwidth full stop).
2) Set up a way to make the unique character easy to type
Set up an easy way to type that character. For example, I use a text expander program to enter a .
when I type ffs;;
[1], but you could of course also create a tiny KM macro containing an action to do that.
3) Create a macro to provide the user prompt
In a globally active macro group, create a macro called, say, “Run macro by name”.
Add just one action: Trigger macro by name
, and set it to Active macros: Smart Group “Macro by Name”
.
In use
That’s all the setting up that is required. You can now, at any time, choose which macros are eligible to appear in the prompt.
The trick is that an active macro will appear in the “Run macro by name” prompt list only if it contains the special .
character.
For example, these macros would never appear in the prompt.
Check if files have been added to the Downloads folder
Open the Trash folder once per hour
but these macros would appear in the prompt but, very conveniently, only when their group is available (e.g. a group set up to be available only in the Finder).
Move the selected files to the Trash.
Close all Finder windows.
Yet another exciting macro.
Switch away from the Finder, and of course none of those macros would be available from the “Run macro by name” prompt.
Examples
Macro named | In a group set up to be available… | Available from prompt… |
---|---|---|
A boring macro for the Finder | In Finder only | Never (the special character is missing) |
An exciting macro from a Finder-only group. | Finder | Only when Finder is the active application. |
Close all Finder windows. | Finder | Only when Finder is the active application. |
A mundane global macro | Globally | Never (the special character is missing) |
An exciting global macro. | Globally | Always |
Another exciting global macro. | Globally | Always |
In the Finder:
Not in the Finder:
That stands for “Fullwidth Full Stop”, of course! ↩︎