Choose multiple macros in the macro group palette, then let them execute sequentially

Forgive my ignorance, I've read the wiki and searched through the forum, but still cannot figure out how to do the following:

  • Let's say I have a Macro group displaying as a palette. It has 10 items.
  • I want to choose any number (more then 1) of these items by clicking on them and have a check mark or some other indication (bolded text?) appear that these items were clicked
  • Then I want to tell the palette I am done with my choices (done button, hot key?)
  • This would close the macro and let all the chosen macros from the group (the ones I clicked on) execute sequentially

Is this possible? If so how can I make it work?

Could it be done?

I think so, but it would be pretty complicated to get working.

You're probably much better off using a Prompt for User Input action with check-boxes.

1 Like

You'll also need to define "sequentially" -- alphabetically by macro name, order in which they were selected, something else? -- as that'll have a bearing on how you design the interface.

Thanks @ccstone, I'll play with Prompt with checkboxes and see if it fits the bill.

@Nige_S, I did not mean anything specific in saying "sequentially", other that I did not want all the actions to be performed at once.

Lots of ways to do this!

Two other ideas, other than setting up a prompt with checkboxes:

  1. To create something that is pretty much exactly what you are describing, including the Palette: Add a "mark macro" action to each of the macros in your desired group, keeping track of the marked state with a variable for each macro, as shown in this thread: Is It Possible to Create a Floating Palate With Buttons That Change Variables? - #8 by Zabobon and then have a separate "executer" macro that reads those variables and executes the ones that were checked, and resets the marked state. You'll need to have some logic to be able to set the mark without launching the macro, I'd probably try dedicating a modifier key, for example:
     
    image

  2. You could also dynamically get a list of the macros in your desired group, or any active group, using this excellent macro: AppleScript: How to Get a List of Macros in a Macro Group without the KM Editor Being Activated? - #22 by JMichaelTX , then use the "Prompt with List" action, allow multiple items to be selected, and then execute the selected macros by name from the result of the "Prompt with List" action.

Good luck!

3 Likes

@Evan_Mangiamele, very nice solutions - I will definitely give these a try - Thanks!