Show a Palette of Macros - Auto-Create and Populate

With tons of help from @Nige_S, we managed to get this going and I think it's pretty slick.

Usage:

Select some macros in a group and trigger this macro. It will create a - Show Palette macro at the top of the group, populated with the pre-selected macros and set to be triggered by § (under the Escape key):

CleanShot 2022-10-24 at 11.09.21

Download:

Show Palette of Macros - Create.kmmacros (85 KB)

Macro screenshot

15 Likes

I am trying to move the mouse after the palette is displayed.
Is that possible?

It is possible within a conflict palette, FYI.

Cheers,

I'm not sure I understand what you're asking.

The mouse is free to move after the palette appears. Are you asking if the mouse can be moved to the palette's location programmatically?

If so, it makes more sense to move the palette to the mouse instead. Here's an example of how that can work:

- Show Palette (Example).kmmacros (44 KB)

Macro screenshot

This palette is empty as I don't have your macros. Add some to test it.

The pause is there to make the palette move more visually seamless. You can adjust or remove it if need be.

It uses the following submacro:

Move Palette to Mouse (Submacro).kmmacros (50 KB)

Macro screenshot

If there's a snappier way to move the palette I'd love to know about it. As far as I can tell, the Manipulate a Window action doesn't recognise palettes as windows of the Keyboard Maestro Engine.

1 Like

Thank you @noisneil
Yes, I'd like to move the mouse programmatically.
Right... move the palette in respect to the mouse would work.
(or alter the position of the mouse in the macro)

The reason for this is: some of the palette's will have 10 items, others will have 20 items. Chances are in most cases I'll usually use the 1st, 2nd or 3rd option so I'd like to be able to 'dial in' where the mouse ends up on the palette and have it located on the usual choice/s.

I don't have time now, but later I'll 'break down' the parameter of %CurrentMouse% and alter it to make the x and y what I would want it to be, then pass that to the sub-routine.
I don't want to alter the sub-routine for obvious reasons.

All good, appreciate your time and expertise here, and on the forum in general!

1 Like

You could use the AppleScript above and add an action to move the mouse slightly, relative to its current position. This might be easier, although either option will work.

1 Like

I've spent time trying to 'set' the mouse to x + 50, and y -100 in relativity to where the mouse originally was and I can't get it.

I don't want to set it in the sub-routine because the I'll have to have different sub-routines for each palette. I'd like to be able to set a variable in the main macro.

I'm sure it's right in front of me.... erg....

Try these:

- Show Palette (Example).kmmacros (45 KB)

Macro screenshot

Move Palette to Mouse (Submacro).kmmacros (52 KB)

Macro screenshot

Set the mouse offset coordinates in the green action.

I'm sorry man, it's not working, I have adjusted the 'x,y' numbers in the green action.
No difference.
Sorry to bother you with this dribble.....

Check that the correct submacro is selected in the palette example macro and try disabling the pause.

1 Like

Thank you man, bingo, removing the pause did the trick...
I appreciate your time..

1 Like

Hi, @troy. If you still want to move the mouse to the palette, this macro and sub macro seem to do the trick.

2023-11-17: 14:36 UPDATE: macros removed from post. An improved version will be posted soon.

2023-11-17 22:16 UPDATE: See SUBMACRO: sm.𝗽𝗮𝗹𝗲𝘁𝘁𝗲⇾MoveMouseToPalette

Hey @_jims , thanx.
It's not seeing the palette window as the #1 window.
With 0,0 set for the move amount, the mouse is moving way away from the palette.

Weird, it works perfectly for me. I’m away for my computer now, but I’ll look at it later today.

What version of macOS and KM are you using? Model Mac?

2017 27" iMac, 18,3
14.1.1 / 11.0.1 - thanx man, no biggie really...

@troy, thanks for testing the submacro I sent via DM. I've posted a refined version here: SUBMACRO: sm.𝗽𝗮𝗹𝗲𝘁𝘁𝗲⇾MoveMouseToPalette

The macro is great. Very useful. Thanks very much. I discovered that I am constantly subtracting (easy) and adding new macros to the palette which forces me to re-start the whole process. The process of adding and subtracting macros is I think by definition part of these types of palettes. If I simply click on "+" to add a new macro, it defeats the purpose of your macro. Would you have a workaround ?thank you

Nice idea! Select the Palette macro and trigger the macro below. Select the macros you want to add and click OK. Let me know how you get on.

- Add Macros to a 'Show Palette of Macros' Macro.kmmacros (60 KB)

Macro screenshot

1 Like

thank you very much. Unfortunately it does not work.

KM 11.0.4 Sequoia

2025-11-24 19:42:31 Execute macro “Show Palette of Selected Macros - Create Display SHIFT CTRL OPT §” from trigger The Hot Key ⌃⌥⇧Section Sign is pressed
2025-11-24 19:42:42 Execute macro “01)- Add Macros to a 'Show Palette of Macros' Macro” from trigger The Hot Key ⌃⌥⌘Section Sign is pressed
2025-11-24 19:42:42 Action 100306171 failed: Select Menu Item failed to find target menu item View➤Disable Macro
2025-11-24 19:42:42 Select Menu Item failed to find target menu item View➤Disable Macro. Macro “01)- Add Macros to a 'Show Palette of Macros' Macro” cancelled (while executing Select “Disable Macro” in the Menu “View” in Keyboard Maestro).
2025-11-24 19:42:53 Execute macro “Engine LOG in Console” from trigger Macro Set Palette

Did you make sure to select Palette macro (the one you want to add more macros to) before triggering the one I posted above?

If you did, either disable the Disable Macro action or turn off "Failure Aborts Macro" via its gear icon:

1 Like

I tried both failure aborts macro (1st try below) and disable macro (2nd attempt below) and neither works. Thanks again for all your efforts.

2025-11-25 07:14:43 Execute macro “01)- Add Macros to a 'Show Palette of Macros' Macro” from trigger The Hot Key ⌃⌥⌘Section Sign is pressed
2025-11-25 07:15:08 Action 100306176 failed: Execute an AppleScript failed with script error: text-script:191:216: execution error: Keyboard Maestro got an error: a kmmacros file or XML must be supplied (-1)
2025-11-25 07:15:08 Execute an AppleScript failed with script error: text-script:191:216: execution error: Keyboard Maestro got an error: a kmmacros file or XML must be supplied (-1). Macro “01)- Add Macros to a 'Show Palette of Macros' Macro” cancelled (while executing Make New Macro).
2025-11-25 07:15:37 Execute macro “Engine LOG in Console” from trigger Macro Set Palette