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?
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).
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.
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).
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.
I'm not sure why but the macro group itself - in this case Email - has to be configured like this
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".
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:
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.
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.