Trigger Macro by Name issue

@peternlewis I would like to suggest that the Trigger Macro by Name does exactly that instead of showing all macros, regardless of their name.

For example here you can see that I typed "sys", but it shows macros that have no "sys" in the name. If the action is Trigger Macro by Name, shouldn't it filter out all macros that don't match what we type? Otherwise, the name of the action stops making sense and should just be Trigger Macro.

image

I'm aware that I can use n: in the beginning of the search field like this:

image

But 1) it defeats the whole purpose of what the name of the action is supposed to do by default and 2) we have to keep adding the n: for each search, which also defeats the purpose of a productivity tool that's supposed to reduce the amount of clicks and keystrokes.

If I type sys and it shows me macros that have the word sys in one or more of the actions inside the macros, then using Trigger Macro by Name loses all its strength and purpose.

It would nice to have the option within the action to restrict the search to name, but I'd hate to lose the flexibility of the current action.

Meantime, here's one way round the problem involving an extra macro and you adding a single action before your "Trigger Macro by Name" action. Demo:

Demo Trigger Macro by Name.kmmacros (1.9 KB)

...and the macro that actually does the work:

TMBN Mover.kmmacros (2.5 KB)

1 Like

Just a quick note as I believe you're new here. @ mentioning peter directly here is kind of bad form. He does read the forum, so rest assured, your suggestion will get read.

1 Like

“By Name” means something in Keyboard Maestro, more than simply “based on the name”.

“By Name” in Keyboard Maestro means that it uses a spotlight-like style interface, as seen across Keyboard Maestro in a variety of places: Insert Action, Function, Token, etc; Paste By Name, Select Menu By Name, etc.

The Trigger Macro by Name action uses the same search as searches for macros in the editor.

Certainly it's possible there could be an option to limit the search to only the macro name, though as you note you can do that yourself easily enough with the n: field, and you can set that as your initial search if desired. There are no current plans to add this additional restriction to only search by name.

It's fine to @ me if it requires my specific attention, specially as I don't necessarily see everything on the forum. In this case, since it's a feature request, no one else can do it, so it is appropriate, although so would sending it to me directly unless the intention is to see if there is more widespread support for the additional restriction.

1 Like

My bad..

1 Like

I ended up on this thread just now because I thought I might be missing something simple. Perhaps I am.


and

gives me

A few minutes ago, the prompt field text read n:wav. I haven't changed anything.

Any idea where these errant search strings are coming from?

I would like @peternlewis to add the option to hide the initial search string in the list prompt, which would negate the need for using Smart Groups like this. It feels a bit hacky to create a new Smart Group for every macro search string just to keep the prompt's text field clean.

If there is no specified initial search, then your last search is remembered.

The two would behave very differently. As a smart group, it limits the search. As an initial search, it is only that, an initial search, as soon as you type anything then it would be searching the entire macro set.

If you want to select it from a set without a search term, you can use the Show Palette of Macros action.

1 Like

I use Trigger Macro by Name as an alternative to palettes, and being able to restrict the scope of the macros displayed without visible text clogging up the search field would be an improvement for this usage. Something like "Show initial search" being pre-ticked under the gear icon.

2 Likes

Also a support/Forum nightmare when people forget about their "hidden" restrictions and complain about macros not showing :wink: "Obviously hidden" is a tricky thing to do in UI design.

You could spoof it with a "Prompt from List" fed by an AppleScripted list of a Smart Group's macros, but that would mean having KM running...

1 Like

Like anything I guess. But yeah, fair point. Smart Groups will do.

1 Like

Here is a new topic that might be relevant: How I limit which macros are listed by “macro by name”