How to package a palette group and sub macros it uses?

I am preparing a macro group for posting. It is displays a palette when activated by a keystroke. The macros in the group use two submacros. The submacros can’t go in the group or they’d show up on the palette. (Correct? Or is there a way to indicate that a macro in the group should not go on the palette?)

I have run into this situation several times recently. What I’ve done is put the submacros in a separate group. Personally I have a group that contains such submacros from my palette groups, but of course that wouldn’t make sense when distributing the macros.

So, my question is, what do people think is a good way to post a palette group along with its submacro(s)?

I think you can select the 2 macro groups and export them. Then just post them manually, e.g. without using “Share”.

That takes care of part of what needs to happen, but what about users managing the two groups? I guess the main group has to say something like “put these two macros anywhere you want, but keep them around because this group depends on it”.

Unfortunately I found a further problem with palette groups, that makes a strong argument for [Feature Request] Macro group description. Currently the only way to document a group of macros – attribution, description, how it works, dependencies, etc. – is to add one or more comments to the group, But then they show up on the palette.

Maybe it would be good to have a way to mark macros as not showing up on the palette – perhaps something as simple as their name beginning with a space. This would solve both problems, packaging and descriptive comment macros. (But I would still like to have group descriptions.)

How about an inactive macro at the top, named something like “_Documentation” or “_ReadMe” or something like that (the leading underscore will sort to the top). Then put Comment Actions in it.

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.

An Example:

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.

1 Like

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.

1 Like

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.