I don’t want those showing up in the palette. Not after the first time the palette is shown, at least.
Inactive macros don’t show up on the palette.
Here's an idea inspired by @DanThomas' post:
Include a "Help" macro in all of your Macro Groups that use a palette, and name the Macro something like "zz)Help" to force the macro at the bottom.
Clicking on "Help", or using the hot key ⌃H, displays this:
of course the contents can be whatever you want.
####Here's the Help Macro:
You could even go a step further, and have the “Help” info displayed in a Prompt, with a button (or checkbox) to hide the Help palette entry, if the user doesn’t want it any more. If they clicked the button, just disable the macro.
You’d probably want to tell them they can get it back by re-enabling the macro. …Or maybe this would just open up a can of worms.
BTW, I guess putting “zz)” in a macro name affects the sorting, but the only thing that shows in the palette is the text after the “)”? Cool. I’m sure I read this before, but I forgot. Thanks for the reminder!
Yep, that’s the beauty of the Help macro – it can be as simple or complex as you like. It could be, for example, a HTML Prompt, with lots of styled text and links to other info.
You can disable the sub-macros, and they can still be called by an Execute Macro Action, but then they won’t show up in the Palette.
So that’s one way: Include the Sub-Macro in the palette group, but disable it.
thwack - That’s the sound of my hand hitting my forehead. Never thought of this before. Perfect! That’ll significantly reduce number of macro groups I have. Thanks!
Or “About”. I like it.
Well, that points to the easiest answer: disable the comment macros!
Sorry, read to fast out of frustration. Didn’t notice the “inactive”. Obviously the correct solution. Though we will all have to remember not to ignore inactive commentary macros.
If you have your sub-macros in a macro group with an obvious name like “Wonder Palette Submacros” to go along with your “Wonder Palette” macro group, then it will not be too confusing.
You can share or export macros from multiple groups and they will retain their groups.
It is not recommended to use Execute Macro on disabled macros or even inactive macros - I don’t guarantee that will work since it goes against Keyboard Maestro’s general rule that a macros can only be executed when it is active.
As suggested, you can have either a disabled Comment macro (disabled macros will not show up in the palette), or a zz)Help macro that does show up in the palette - this macro could even offer to disable itself if desired so that it would then be removed from the palette.
That’s too bad. It seemed to work OK in my limited testing. Seems like a good use case that any macro can be executed if directly called from a viable macro that is active and has been triggered. In general, I don’t want any of my sub-macros to be triggered directly.
What’s the difference between inactive and disabled?
Macro Groups and Macros can be individually enabled or disabled.
Macro Groups can be active or inactive, and Macros follow along with their contained Macro Groups. Activation/Deactivation is a transient state and typically happens automatically as the system changes, and is controlled by the Macro Group configuration:
If the engine is restarted, activation states are reset to their defaults, but enabled/disabled is a semi-permanent state.
Of course you can also activate/deactivate macro groups using the Activate or Deactivate Macro Group action, and you can enable or disable macro groups or macros using the Set Macro or Group Enable action, so there is some fluidity in all of it.
But conceptually, for a macro to be active:
- The macro must be Enabled,
- The containing macro group must me Enabled,
- and, the containing macro group must be currently Active.
NOTICE: I have made this post a “wiki”, so we can edit to make it clear and correct.
@peternlewis, thanks for the details. **Revised: 2016-05-26 14:52 CT (Thu)** Let me see if I correctly understand "enabled/disabled" vs "active/inactive": * **Enabled/Disabled** * By default, all macros and groups are _Enabled_. * _Enabled_ means a macro, or macro group, is available to be triggered, if, and only if, other criteria are also met. * If a macro is disabled, or is in a disabled Macro Group, it cannot be triggered under any circumstances * You can toggle enable/disable by: * Click on the ✔ or ✖ in the upper right corner of the macro or group * View menu > Toggle Enable * Run macro with _Set Macro or Group Enable_ Action . * **Active/Inactive** * Active means that the macro can be triggered for execution when any of the trigger conditions are met * Macros are Active ONLY if all of the following conditions are met: * Both the Macro and Macro Group are enabled * The activation criteria for the Macro Group are met <img src="/uploads/default/original/2X/f/f9d155e50753ea9be2ddd3e224f97914a4ffd364.png" width="583" height="376"> Is this correct? If not, please EDIT this post to correct it. Once you approve, I'd like to put this in the KM Wiki.
Hmm. A little confusing, assuming I actually understand the concept. How about something like this, perhaps with a little visual embellishment?
- Disabled is like commenting out a line of code - you can look at it in the editor, but it doesn’t do anything, and can’t (or at least shouldn’t) be executed from other macros.
- Enabled is the normal state for a macro/group.
- Active means all of the “Available when” conditions are true, assuming the macro/group is Enabled.
- Inactive means none of the “Available when” conditions are true.
Do I understand this correctly?
all conditions must be be true.
There is also Toggle Enable on the KM Editor View menu.
Dan and all:
I just made an update. Is it clear now?
The image really tells it all.
That looks good to me. Good job!