I created the attached macro to backup to a folder all created and modified macros during the past week using a "created or modified in the past week" smart group I created.
I use it often when I am working editing and creating macros, and it works fine.
After running the macro, I open the folder (easy to implement in the macro) and
1- zip the folder
2- delete the initial folder
To save time, I would like add the following to the end of my macro
1- zip the newly created folder
2- if it is risk free, delete the initial folder
It's not in the right-click context menu but it is in the regular top menu item Edit>Copy as>Copy UUID
I have noticed a few differences between the context menu "Copy as" vs the top menu "Copy as". For example, copying a Macro's XML returns a different result, depending on which method is used (menu "Copy as XML" gives an XML that can be imported as a Macro, whilst context "Copy as XML" gives a version of XML that cannot be used to import a Macro).
As a result I have stopped using the context version of "Copy as" and now always use the top menu version. Not sure why there are these differences and I have been meaning to ask @peternlewis
I discovered something by accident today and started using it to accelerate my workflow.
If you copy an action as XML → with that XML you create a typinator shortcut, and repeat for most commonly used actions.
If you create a new macro and add a comment at the top, you can quickly (by writing the typinator abbreviation inside the comment) generate a series of actions to create the macro.
I have been doing a similar thing. Set the Action up as I like, including its color, etc. Copy it as XML then make a Macro that just Inserts Text by Pasting that XML text. I then give the Macro a shortcut and have it in a Group that is only active in Keyboard Maestro. For example ⌥P inserts a Prompt for User Input Action, ⌥V inserts a Set Variable Action, ⇧⌥V inserts a Set Variable to Calculation⌥I inserts an If Then Else, ⌥S inserts a Switch Case Action etc. Basically all the Actioins I find I am using all the time. It works really well.
much better than my method. Faster and smarter. I will adopt your method and put mine in the garbage. Thanks VERY much !! It will keep me busy tomorrow.
I know that it's possible to see the most commonly used macros (view → sort). Is there the equivalent for actions? I will be creating a macro group like yours and it would make things faster if I could determine which actions I use the most.
Since you've stored the source path in a variable it's easy enough to delete later:
What I would suggest is that you change your macro so you build your export file path then use it, instead of building it as part of the "Paste" action. That way you'll have a known path to work with, and won't have problems if you export at 11:59 and try to compress/delete at 12:00!
One thing to be aware of when you are making one of these Macros. If you simply paste an Action's XML into the Insert Text by Pasting Action you will actually just create a new Action in the macro you are working in. So, you first need to "disable" the XML text you are pasting, by opening it in a text editor and adding some random character to the start (I usually add a "1"). This text can then be safely pasted into the Action without anything happening. I then delete the "1" at the start to make the XML a working XML again.
XML pasted in with "1" at start to disable it making a new Action in the Macro during the paste operation.
Since only the first-level <dict> and its contents are required, you can also paste into a text editor, copy from there everything from after the < of the first <dict> to the end of the last </dict>:
I created this macro to pick up actions as I go along. I paste the clipboard into your macro which I renamed TEMPLATE and which I duplicate.
I started using your method and it's absolutely great ! thank you very much !
There is no good reason. They should be the same, but aren't always. The most annoying was when you got different images or XML depending on which one you chose, but hopefully that is not the case.
The contextual menu should be a simple subset of the menus, but it isn't quite that simple.