PURPOSE: Move Selected KM Actions into a new Group Action
HOW TO USE:
(1) Select the KM Actions to move
(2) Run this macro
(3) IF the "KM Group Action" Named Clipboard does NOT EXIST,
user will be prompted to select a Group Action to use
and it will be used to create the Named Clipboard
REQUIRES:
(1) Keyboard Maestro Ver 7.1.1+
(2) Yosemite (10.10.5)+
There’s probably a bug in it, because it did something weird the first time I tried it, but then it worked OK after that. Here’s the steps I did, to the best of my recollection:
Ran the macro, it told me to select a group action, so I stopped the macro.
Ran it again and selected a group action this time and clicked continue, and it told me it created the named clipboard, etc. Did not group my actions this time (that’s OK).
Ran it again, and it nested 3 groups inside themselves, without my actions.
Did some undos, tried it again, and it worked fine.
I’d like to have a similar function that places the selected actions into a Repeat Action, or into an If Then Else Action, or a For Each, etc. I’m still trying to get it working myself but am having little success.
Yeah, that’s not going to be easy, because, as I’m sure you’ve found out, you can’t just paste in the Repeat action (for example) then paste in the actions that were cut. They won’t paste in the right place.
Do you happen to know JavaScript? If you do, I could give you some ideas of how to do it. I’d write it for you, but it’s not something I’d use since it’s fairly trivial to do it manually, and I’m focused on other things right now.
Yes I’ve seen. I’ve been trying to use keystrokes to position the cursor for pasting the actions back in, but there are too many variables about what other actions may be placed around the Repeat to do so automatically and reliably.
I don’t know any JS, but as you’ve noted it’s not a big enough issue to worry over and further. Usually when I’m planning actions that will repeat or be If/Then/Else’d, I know ahead of time
Use it all the time . One suggestion: After the group is created immediately select Rename from the Gear menu — it is always what I do after executing this macro, and is harmless in any case.