Prompt for User Input Macro Idea

Can anyone help me create a macro where I can repeat an action 3 or 4 times with slight variations?

The basic macro is simple- I locate a button in the app (Logic Pro), click said button with modifiers (command + shift) and scroll down a list until a find what I want and select that. I would then need to repeat this process 2 or 3 more times, but make different selections from the list each time.

New user here, so many thanks in advance! Still wrapping my head around the basics.

Hey @bog_standard,

Welcome to the forum!   :smile:

Your description is a little vague for someone who doesn't have Logic Pro to test with.

Once you've got the button open can you type-select to get to the item you want?

-Chris

Hi Chris, thanks! Sorry about the obscure description there.

To answer your question, there is a little visual area for assigning “groups” on every channel strip in Logic (calling this area a button for lack of a better term) where if you click, a pop up menu is presented. This pop up menu displays a list of all available groups, which are listed as group 1, group 2, group 3 etc. This area is almost always visually available on the left side of the screen, and will be in the same place consistently.

It seems you cannot type the name of the group when the list pops up, but you can navigate with the arrow keys. The selection must be made the shift-command modifiers held down, or else subsequent selections will replace the first one. The main idea is to select 3 or 4 groups for a newly created track as quickly as possible.

you can

  1. use a Prompt for User Input
  2. save what you entered as a variable, then,
  3. Use a Switch Case action.

So, if you enter "1" in the prompt, the Switch Case will run the action that uses the variable "1".
and so on for the others.

See this macro for an example:

EDIT: Do you know if Logic Pro supports Applescript?

Thanks so much @hello! I'll peruse through this now and report back with any questions if needed. Logic has a "scripter" midi plugin, which can be instantiated on certain types of instrument tracks that employ midi. It looks like it runs JavaScript, not sure if that is relavant to Applescript however.

Ok, I've got a great solution going now thanks to @DanThomas brilliant Spotlight Search Prompt. I'm just hitting one snag, for some reason Logic Pro is not recognizing the modifiers attached to my clicks or keystrokes. After some tinkering, I found a kind of hack, but it is very clumsy and works inconsistently.

Hacked Solution:

Ideal Solution:

Any ideas as to why the modifiers aren't translating?

hmm, try, for the mouse, a Move action, then a Click action.
(so, separate the Move and Click action into two actions)

@hello will try that now, what about for the return keystroke?

Edit: No luck with separate move and click. Did you mean something like this?

This arrangement seems to work pretty consistently, though I have no idea why..

Thanks for your help everyone!

2 Likes

I've had to do things like this before, so you're not alone. I like the fact you changed the "hold" and "release" actions so they don't wrap the entire group, like the first example you posted. For whatever reason, I was worried that could have caused some problem somewhere down the road, although I couldn't say why exactly.

Anyway, this is what I love about KM. It gives us all sorts of ways to tackle issues. Good job.

1 Like

Hello @bog_standard

welcome to this forum from me, too....

sounds that your idea with  Logic Pro is working .... gratulations... I haven't Logic by my self but I think I've either a god tip for you for future Macros whose are tempting to be very long and complex .... even like in your Example where you're using at least one Group Action for wrapping things up and giving the Macro a better structure for maintenence.

have you thought of maybe breaking the spead down a little bit before the Move and Click Mouse Action ?? I Have a lot Macros by my self where I had to add a Pause Action before the Move and Click Action to get it to work probably - or I made the same like in @hello 's suggestion breaking it up and added one Pause Action before the first one and between the first and the second one.... One or two of these Macros I am talking about even work with just 0.1 - 0.2 seconds....

maybe you try it out ??

I got this tip a long time ago from a fiend of mine - and it can help a lot ...

Greetings from Germany

Yes, looks good. For the second action, I'd make it only Click, not Move and Click.
and as @Nr.5-need_input just commented, add longer pauses. It allows the computer to catch up