I create a lot of macros with KM and I like to share them both on this blog as well as in the KM forums1. Taking screenshots of the macro is an important part of this sharing and has been very useful to me as I have learned to use KM from my betters in the community. Previously, I would use the standard screen shot functions of OS X, but with very long macros that did not all fit on one screen there was no elegant solution.
I believe it was in 6.0 that Peter added the ability to copy a macro as an image. I failed to pay much attention to this at the time in light of all the other great functionality, but recently put it to use.
The copy as an image puts the highlighted portion of your macro into the clipboard. By itself, this isn’t very useful because I need an actual image to upload to the blog, and as far as I can tell that functionality is not built in2.
So I created a macro.
You can either select individual parts of the macro you want to share, or select nothing and the whole macro will be used.
Using a hotkey, trigger the Create Screenshot Macro.
- Select the
copy as imagefrom the menu
- Prompt the user for the file name
- Save the file to the desktop
There’s also a
copy as text if you want to just share the text of the macro. I prefer to write my own descriptions because I think it’s more useful, but including the text is nice too. See below.
Create screenshot of KM macro
Triggered by any of the following:
The Hot Key ⌃⌥⇧⌘M is pressed
Will execute the following actions:
Select Menu Item in Keyboard Maestro
Select: Edit ⇢ Copy as ⇢ Copy as Image
Stop macro if menu cannot be selected.
Prompt for User Input ‘File Name’
What do you want to call the file?
Input the following variables:
Finish with the following buttons:
Cancel (cancel macro)
Store button pressed in variable ‘Result Button’.
To file: ~/Desktop/%Variable%File Name%.jpg
With format JPEG).
Room for improvement
I would like the ability to automatically name the jpg with the name of the macro.