“Trigger Macro by Name” for a Specific Macro Group?

My apologies -- I missed that in your post.

Ah, yes. Not something I'd noticed, since the few times I've done this I've limited the action to "active macros" which, of course, removes any "available except..." matches from the list.

I did what you described in a different way following the instructions below as suggested by Google Gemini.

Method 1: Using a Smart Group (Recommended)
This method involves creating a Smart Group that dynamically includes only the macros you want to appear in your "Trigger by Name" list.

  1. Create a Unique Identifier:
    • Choose a unique character or string that you will add to the names of all macros you want to appear in your "Trigger by Name" list. This should be something you wouldn't normally use in a macro name, e.g., . (fullwidth full stop), §, or TBN. Let's use § for this example.
  2. Rename Your Target Macros:
    • Go into your "Trigger by Name" Macro Group.
    • Edit the name of each macro you want to appear in the list and append your unique identifier to it. For example, "My Specific Macro" would become "My Specific Macro§".
  3. Create a Smart Group:
    • In the Keyboard Maestro Editor, go to File > New Smart Group (or right-click in the Macro Groups pane and choose "New Smart Group").
    • Name your Smart Group something descriptive, like "Trigger by Name List".
    • Configure the Smart Group to include macros where the "Macro Name contains §" (or whatever unique identifier you chose).
    • You can also add other criteria if needed, such as "Is Enabled" or "In Macro Group 'Trigger by Name'" (though the naming convention effectively handles this if all macros in that group use the identifier).
  4. Configure Your "Hotkey for Trigger by Name" Macro:
    • Go to your "Hotkey for Trigger by Name" macro in your Global Macro Group.
    • Edit the "Trigger Macro by Name" action.
    • In the settings for "Trigger Macro by Name," you'll see an option to "Restrict to Specified Macros or Macro Groups."
    • Select your newly created Smart Group ("Trigger by Name List") from the dropdown menu.

How it works:
When you trigger your "Hotkey for Trigger by Name" macro, the "Trigger Macro by Name" action will now only display macros that are part of the "Trigger by Name List" Smart Group (i.e., those with your unique identifier in their name). You can then type to filter this curated list.

Advantages of this method:

  • Dynamic: The list automatically updates as you add or remove the unique identifier from macro names.
  • Clean: You don't need to manually update a list within the "Trigger Macro by Name" action.
  • Flexible: You can easily add macros from any macro group to this "Trigger by Name List" by simply adding the identifier to their name, even if they aren't in your "Trigger by Name" macro group.

Hello @sccardais :wave:

That’s something where you have to be sure that KM Editor is always running when the list should change ….

It’s because you’d need to do this with scripting (either AppleScript or JXA with and without Obj-C API‘s) since you’re going to manipulate the Macro Names by adding or removing such characters.

Also you’ll have to think about some kind of context where you would have done this by Macros automatically to have your desired Mix of Macros at Hand.

This solution will also grow in size as you may add more and more contexts and automations for them. Keep this in mind.

Greetings from Germany :de:

Tobias

1 Like

I wish I had thought of something like that. Oh, I had...

Original post from last December (as linked to by @crlf earlier on the present page):

How I limit which macros are listed by "macro by name" - Tips & Tutorials - Keyboard Maestro Discourse

New summary, from a week ago (as linked to by me earlier on the present page):

A “trigger macro by name” prompt for only the active macros that you want to see - Tips & Tutorials - Keyboard Maestro Discourse

Gemini wants to be everyone’s “twin”, right? :smile:

1 Like