I have two suggestions for smarter palettes:
Ignore group macros beginning with a certain character: space, bullet, underline, whatever. This allows including submacros in the group that uses them without them showing up in the group’s palette. (See Go to Macro in Execute a Macro and How to package a palette group and sub macros it uses? for related discussions.)
Going further, some tools that allow the user to create a menu follow a convention that supports menu-ordering (see below). (At the moment I can only think of ones that are menubar menus; I can’t think of a tool that supports this in popup menus.). I vaguely remember seeing something like this in KM documentation, but I haven’t been able to find it. (However, the “Package” macro mentioned above includes an example that seems to do what I’m talking about, since the “zz)” does not appear on the example palette.d So if the feature is already there, tell me how to use it, but if not consider this a second feature request.
- Currently I use spaces, dashes, etc., and sometimes odd characters (◌ ◯ ◙ ❘ ⬚, ▷ etc. — PopChar is my friend ), to force an order to my palettes (as well as ordering the macros within the group in the editor).
- Which characters I use depends somewhat on how visible I want them to be, and it takes some experimentation figure out the sort order of the weird characters.
Here’s an example from the documentation of Script Debugger 5:
If a name starts with the prefix ##), where ## is a two-digit number (00-99), these digits are used to determine the position of this item in the menu and the prefix does not appear in the menu item’s name.
A name ##)-*** will appear as a menu separator, again with its order determined by the two-digit number ##.
I doubt that KM Palettes are ever big enough for a full treatment like this, but I can’t think of a simpler one at the moment.