Show Palette of Macros - problem

I'm trying to do something very simple, and I'm somehow doing it wrong.

I have several macros in Things that fire URLs for saved searches. I wanted to put them on a palette to make it easier to call up the right one.

When I use Show Palette of Macros, no palette appears.
I have the macros set to "All Macros."

What could I be doing wrong?

Start by trying the Assistance window (Help ➤ Assistance) and clicking the Something expected is not happening and follow the instructions there and see what you can learn.

Does it work if you click Try?

Thanks for your help, Peter.

Clicking Try makes the Palette appear in KM. I've tried changing the trigger several times, but the palette still doesn't appear in Things.

I tried Assistance, and it says "The Macro Group is Inactive." When I check, the macro group is set to "Always activated."

Just to be sure, I tried Assistance>Something Expected Is Not Happening on a completely different macro and group that is working fine. It still returned "The Macro Group is Inactive." That group is set to "Always Activated" as well.

Is there some other way to activate a Macro Group?

It also says “Available in these Applications: Things”, so the macro group will only be active in Things, so none of the macros within it will be available except when Things is the front application.

Right. And when Things is the front application, the palette doesn't appear when the trigger is fired.

I changed the group settings to "Available in all applications" and it still doesn't work.

Assistance still says "The Macro Group is Inactive."

I believe there may be cases where you have explicitly deactivated a macro group, and then changed the activation settings on it and then Keyboard Maestro does not notice because it thinks the macro group is still deactivated.

Try quitting and relaunching the Keyboard Maestro Engine (File ➤ Quit Engine, File ➤ Launch Engine).

That fixed it. Thanks.

Is this rare, or should I look out for this whenever I reactivate macros?

It's rare. I have it on my todo list to look at, I'm pretty sure it only happens if the macro group is manually deactivated (with a macro action like Activate or Deactivate Macro Group action) and then the macro group is changed to “always activated”, but it is already deactivated and Keyboard Maestro doesn’t activate it but thinks it is active already.

So Peter, once a Macro Group has been Deactivated via a macro action, does it remain deactivated forever, until another Macro action activates it?

FWIW, I have not knowingly used either action. I deactivated this group by changing the Active Status pop-up menu by hand.

It remains deactivated until it is activated manually, yes.

Once you start mixing activation in the macro group with manual activation, there is never going to be a well defined behaviour. For example, if a macro group is active only in Safari, and then you manually activate it in the Finder, what happens from then? If you switch to Safari and then out of Safari, should it still be active, or should it deactivate. There is no well defined answer to this.

Keep in mind that activation status is a transient state, so it is not preserved if the Keyboard Maestro Engine is quit and relaunched (this is a primary difference between Activation state, and then more or less permanent Enable state).

The activation logic is incredibly complex (combine all the logic from the macro groups together with manual activation and “for one action” behaviour and you can get an idea of how complex it all is).

1 Like

In case this helps: I solved a similar problem like this: I created a Macro Group called Palettes:

31%20PM|489x142

Every macro in Palettes corresponds to a Macro Group - and looks like this: (This is what the macro in Palettes - looks like corresponding to my Email Macro Group. The first two actions are unnecessary. The third action is the important one.

42%20PM

I'm not sure why but the macro group itself - in this case Email - has to be configured like this

THen, when I execute the macro, 'Email,' in the Palettes Macro Group, the palette displays, like so (You can see the very top of the palette):

31%20PM

the above is the first screenshot of my Palettes Macro Group.

Well, unless you want to define rules for it.
IMO, a MG that is defined as being activated only when certain app(s) are frontmost should always maintain that rule, and not be allowed to be set active by a macro for other apps.

It's hard for me to image a good use case to allow it, but I suppose there could be a very rare edge case for it. IMO, the loss of use for that edge case is well worth the clarity you get by having clear rules.

As you say Macro Activation is a difficult subject to understand. I would definitely support adding some limitations to bring clarity and predictability.

IMO, it is dangerous to have any software that can behave in an unpredictable way just through normal use of its "code".

Just my 2¢. :wink:

Peter, MInd if I ask a related question. I have the repeated experience of disabling a macro and expecting related macros - that might be based upon this foundation macro - to be disabled but they're not. I've seen people discuss this on the forum. Have you come across this and is there a general answer or would you like a specific example?

In that case the Activate Macro Group actions would basically not be possible, since they explicitly change the activation of a macro group so it will always be different at that point from the group’s normal behaviour.

As a general rule, a macro that is disabled (or in a disabled or inactive group) cannot be triggered or executed.

There may be some exceptions to this though, and that should only ever be cases where the macro is very explicitly executed:

  • Execute Macro
  • AppleScript execute macro with UID

Things like that that are very explicitly targeting the execute of a specific macro. At that point it is up to you to control whether you want the macro to be executed or not by controlling the explicit request to execute the macro.

This should be resolved for the next version.

Basically it can happen any time a macro group is inactive, and then you change the configuration to something that should make it always active. It remains inactive, and since no condition changes its state, it remains inactive until you relaunch the Keyboard Maestro Engine.

Was it resolved?