Suggestion: Multiple Parameters / Trigger Values for Execute Macro action

Would be nice to be able to execute macro with multiple parameters. They could just be numbered Parameter1 Parameter2 and then accessed with TriggerValue1 TriggerValue2. Or they could have names, but that increases the complexity.

I have tried rigging up delimited trigger values that get parsed into individual variables at the beginning of the subroutine but its very messy...

1 Like

Hi Joe,

I'm unclear about how you imagine actually accessing and using those parameters. What do you imagine you, as the user, would type or click in each case?

I have a list of macros that I trigger all starting with the Hotkey combination Opt+Cmd+Shift+s (OCSs, for short), which I can easily type with my left hand. That brings up a menu and if I want I can look over the menu, but for most it's just OCS 1 or OCSs 2 or OCSs f or OCSs p, or whatever. In a sense, the second keystroke is a parameter on the first one that determines which variation I'm picking. In my case, the second keystroke determines which of my multiple desktops I want to switch to.

I used to have a series of macros that I ran the same way, but the second keystroke was not a "choice", per se, but rather me choosing which step in a sequence I wanted to run. Opt+Cmd+Shift+z (OCSz) is four keys at the corner of the keyboard, and pressing that combination brings up a menu of the multiple steps in a complex processes. I ran them as OCSz 1, then OCSz 2, then OCSz 3, etc. while I was developing and debugging the procedure. Now I've added OCSz z to the menu and it just runs 1, 2, 3, etc. in order.

In the first menu, the menu choice is more like a parameter because each option does the same thing except for the choice of target desktop. But the second menu could also be seen as a parameter choosing which step of the process to execute.

Is that what you have in mind?

August

Would it? Huh. I should think about doing something like that for the next version…

Oh wait, never mind. Done for the next version.

11 Likes

I'm unclear about how you imagine actually accessing and using those parameters. What do you imagine you, as the user, would type or click in each case?

To clarify, by Execute Macro action I mean the actual action that executes macros. Right now you can pass in 1 parameter which is accessed using the %TriggerValue% token, but multiple parameters would allow parameterizing more complex macros.

Oh wait, never mind. Done for the next version.

Is there a beta link? :wink:

Thanks. Now I understand what you are trying to do.

I, too, am looking forward to what Peter suggests will be in the next version. I don't think he does Beta releases, at least, I haven't seen any mention of them. And I don't know if this "next version" will be a full version, i.e., version 10.0, or an upgrade, version 9.3. Version 9.0 came out in August 2019 and version 8.0 was released in September 2017, so I suppose it depends on whether there are other major features in the upcoming release.

The next version will be version 10.0 (unless for some horrible reason I was forced to do a 9.2.1, in which case every mention I’ve made on the forum of "next version" would not apply, but lets hope that is not the case).

3 Likes

At this point, someone is just showing off. You would think that @peternlewis was the developer for Keyboard Maestro. :roll_eyes:

Wait, he is! Go Peter!!! :grinning:

6 Likes

Another option would be to pass a JSON string as your parameter, and just parse it.

2 Likes