How to Try Action(s) With Single Keyboard Shortcut?

I tried setting up keyboard shortcut for 'Try action' menu item. Both using Mac system preferences as well as a Macro in Keyboard Maestro.

Looks like the menu item is dynamic (The menu item text changes) based on how many actions are selected. I'm looking for solution where I can Try action using same keyboard shortcut irrespective of how many actions I have selected.

If the solution is found, I'd also like to apply it to another menu item 'Disable/Enable action'.

KM supports using regular expressions with menu commands by adding a ^ at the start of the command, which lets you do something like this for dynamic items:

Try Actions.kmmacros (2.3 KB)

The same method works for enabling and disabling actions. I've used the below macro myself for years to do just that via the keyboard:

Enable:Disable.kmmacros (2.6 KB)

6 Likes

Awesome
Thank you.

I don't know what those symbols mean. Can you please point me in the right direction to learn it so that next time I'm dealing with dynamic menu item, I can apply things. I am from a non-technical background so please suggest accordingly.

You're welcome. Those symbols are part of a pattern matching syntax called regular expressions, or regex for short. They're very useful, and there's a lot of pre-existing discussion about them on this forum, with one of several threads on the best way to learn them having been bumped very recently:

2 Likes

Damn
I looked up the phrase. Looks like it could consume some time.
I'll have to keep it on the back burner :smile:

Thanks for sharing the info and the link.

1 Like

Be aware that regular expressions can be used in many other places besides Keyboard Maestro. They are super-handy. Learning the easy stuff is..easy. The harder stuff with regexps are also less commonly needed.

Jump on in!

2 Likes