Macro that midway opens a window with either buttons or clickable text to perform tasks

To make it clear what I want to achieve:

I'm a musician and I work with Logic to make music. Some plugins don't have the arrows to load the previous or next effect. Apple only provides a dropdown menu, which to me it's so cumbersome and I can't even understand why companies go this way and not the arrows way... (end of rant haha)

So I would like to have a shortcut that would trigger a certain macro and then it would open a window, for example, where I could click one of two buttons and each would trigger a macro (one to open the dropdown menu, press the down arrow on my keyboard, press Enter).

So this can be a window with buttons or any other way that I can keep triggering macros. I could use shortcuts, yes, but I already have memorized so many shortcuts I use on a regular basis that if I can just have buttons to click, that would be awesome!

Any tips?

Can't you create a palette with the items from the dropdown menu?

Ah, you don't like the palettes because you can't use the arrows for navigation, right?

Take a look at the "Prompt for User Input" action -- you can add extra buttons then run macros depending on which is pressed: Plenty of other input options too, which might be useful in other projects.

Or -- and just throwing this out there -- since you only want buttons, why not make a KM palette for the macros you want? Then you could just click, rather than use a shortcut that opens a dialog that you then click a button in.

Yes the idea is that if I keep saving custom presets, I don't have to create additional macros so the Prev/Next buttons would allow me to do navigate without extra work

Sorry, I do not understand, can you put a screenshot?

You can see the dropdown menu, but not Prev / Next arrows so we can cycle through the different option inside the menu:
Screen Shot 2022-06-18 at 3.21.59 PM

When you click to open the menu, this is what you see:
Screen Shot 2022-06-18 at 3.22.05 PM

So every time you want to try a different option, you have to click the menu, move the mouse to the previous or next option (or use the arrows on the keyboard), click with the mouse (or press enter). It's a killer when it comes to having a fluid workflow.

So I would like to have buttons where I could automate those steps.
Does it make sense?

The buttons seem to close the window when clicked. The idea is that the window stays open until I close it so I can click the buttons over and over again.

On the top section, there's no option to add other buttons either.
Also, if there's a way to leave the window open, how would I assign a macro to a button? I don't understand how this could be achieved?

This would face the same issue as the Prompt: when I click a macro, the palette closes and I need to open it again. The idea is that it stays open the whole time.

For example on that example I shared, I can't add custom filters to that menu, but in certain situations I can add custom presets. So if I would use a macro for each preset on that list, I would have to always add another macro for each time I save a new preset. That's not only a lot of macros inside KM, but I would have to remember that workflow every time I would save a preset. Not good. So using arrows left and right, even if I create 100 presets, it would just go to the previous or next presets without me having to add anything extra to KM.

Maybe the best option is to really just use shortcuts and just memorize them (because for each plugin and synth, I need a different shortcut).

Ah, gotcha.

No, palettes don't necessarily close when you click on them -- for example, the "Menu Glyphs" palette in the Macro Library. Have a play with the palette settings -- this seems the most likely approach to getting what you want. And if you don't want the palette showing all the time use a hotkey to toggle its visibility.

I'm sorry, I'm a bit lost here...
I double clicked the Menu Glyphs, but all I got was a group with a lot of macros with arrows and all that.

Not sure what to do with this or how I could explore how this could be useful for my case?
Also, what do you mean by "palette settings"? The only settings for palettes I can think of, are the ones to change the colors of the default palettes on the Preferences window. Is this what you mean? If so, I don't see any settings that would apply to a palette I created inside a custom macro...

What Nige_S means is that palettes can also always be displayed (not just for one action), but that's of little use to you if the menu always changes.

Maybe a stupid idea. Does the app show the shortcuts in the menu if you have assigned any? If so, take a floating screenshot as a sort of a cheat sheet.

At least this can be done more easily. With "Select and show the menu item" you can open the menu without moving the mouse. :man_shrugging:

Not sure what you mean by this...?
When I said I would probably go with the shortcuts, is the KM shortcuts assigned to macros to open the plugin's menu and then clicking some arrow and the Enter key. That way if I want to keep cycling through the options, I just need to keep pressing those shortcuts.

I'm lost on this one... what do you mean?

These menus are usually plugin specific menus. They are not app's menus, so I don't think the Menu action would work in this case.
Also, even if it did, how would KM know that I just added a new preset? To use the Menu action, I would have to specifically say what I wanted KM to press, so this goes back to what I was saying: I want to be able to keep adding items to those menus (in this case those items are presets) without thinking that I need to keep coming back to KM to add another macro or menu option.

Let's say the menu on the plugin has 2 presets:

  • Moon
  • Sun

So I go to KM and add those.
Now tomorrow I create 5 more presets:

  • Sky
  • Beach
  • Party
  • Car
  • Life

I would have to go to KM and add those, which is not what I want to achieve. if I had to have all that extra work for each new preset, I would might as well just use the normal behavior of clicking the menu over and over again. The goal is to save time and work, not add more :slight_smile:

can you click somewhere and the menu opens? If so, you can automate this without moving the mouse.

How about this? It runs an OCR scan on the bottom of the plugin window to determine what plugin it is. It then uses the OCR result in a Switch/Case group to click somewhere relative to a window corner. This means you can select the previous or next item in a dropdown list in multiple plugins with just two hotkeys.


With the red group enabled, make sure the front window is your plugin and trigger the macro with either hotkey. The OCR result will appear. It may not accurately reflect the text you see at the bottom of the plugin window but that doesn't matter. Copy the OCR result to an entry in the Switch/Case group and add your Click Mouse action. One entry is already added for you as an example, which clicks the Filter Type dropdown in Retro Synth, as per your screenshots. When you're finished, disable the red group.

In use:

The macro is triggered by either ⌃⌥⌘↑ or ⌃⌥⌘↓. Depending on which hotkey you press, the previous or next setting in the list will be selected.

Plugin - Previous-Next Setting.kmmacros (34 KB)

Macro screenshot

Open a new document in TextEdit. Open the Menu Glyphs palette. Click on the various palette items and you'll see the glyphs inserted into your document. The point is that this is a palette from which you can click "buttons" to run macros and it doesn't close when you do.

So you could create your own little palette with the macros you want to use for this job and just click on whichever you need to run. Effectively you're making a "dialog with buttons that doesn't close when one is clicked".

Have a look at Palettes, particularly "Macro Group Palette" to get an idea of what you could do.

Further to my previous suggestion, here's one that requires no setup of the macro itself.

In use:

  • Position your mouse over the setting dropdown (for example, the filter type in Retro Synth).
  • Press and hold either ⌃⌥⌘↑ or ⌃⌥⌘↓ for a moment.
  • From this point on, tapping either of these hotkeys will increment the settings of that dropdown up or down accordingly. If you want to use this with a different plugin, you can recapture the position using the first two steps.

Plugin - Previous-Next Setting v2.kmmacros (32 KB)

Macro screenshot

1 Like

Wow, you are a beast at this! I have no idea what's going on there, but it works!
If I want to use a different shortcut, for example I want [ to decrease and ] to increase, that way I don't have to press so many keys at the same time and I can just use one hand to navigate, besides the triggers, what else should I change?

The only plugin that sucks at this is Alchemy. Not only the menus are different, it doesn't save the option when you click one preset. For example if you try one of the reverbs, you need to press File, then Presets. But if you choose one of the presets, next time you open it, it assumes the top position.

In the short press actions section, you need the two to differentiate for up/down, so set the first to [ and the second to ].


I'm not seeing the previously chosen preset jump to the top on my setup, but I'll take your word for it. As far as having to click File > Preset, you could write a second macro that simulates the "P" key before ↑/↓ and then :leftwards_arrow_with_hook:. This seems like a lot of faff for one parameter unless you use my first suggestion, which can do different things per plugin. In that case, you'd just add a "P" key right after the Click Mouse action in Alchemy's Switch/Case entry. However, I'd be tempted to just change the reverb by hand. You have to balance out faff with time saved.

Done and working. Thanks. Much better :slight_smile:

What I mean is that it doesn't save the state of the effect as a preset, like the Retro Synth does where you can see which filter is selected or how Alchemy's OSC shows you which wave is being used. For the Delay and Reverb, it loads the settings, but then when you go back to the preset list, there's no way to know which preset was loaded, so having a key to go up or down, I don't know if that would work. Hope it makes sense...

I haven't looked at the other macro, since this one was working. I will see if I can understand it.

Ok I understand now, and that would be very tricky if not impossible to automate. Can't win 'em all!