A Macro to Put the Selected Macro to the Clipboard?

Hi, since many of you frequently upload macros to the forum, I was wondering if any of you have built a macro to put the selected macro(s) to the clipboard so that it can be directly pasted to the post?

the manual steps are:

  1. Export the selected macro(s) to a folder (a *.kmmacros file).
  2. Copy the macro to the clipboard.
  3. Delete the macro.


@martin, what is your ultimate objective? How do you want to use the macro?
Do you want the XML of the Macro, or just the Macro name?

Please read:
Tip: How Do I Get The Best Answer in the Shortest Time?

I thought I have described my goal very clear: To get the selected macro(s) into the clipboard as a .kmmacros file. I have also stated the manual steps I would take to get the macro, so that I can directly paste the file to the forum post.

If I'm not mistaken, the .kmmacros file does contain the XML data. To be clear, I want a .kmmacros file, not the XML data as a string in the clipboard.

When I am posting something to forum, I use the “share” feature built into Keyboard Maestro, which will upload the macro and an image of it.

(The share feature being behind the little square with an up arrow icon which is fairly standard now in macOS and iOS.)

The "Share" only works when we are writing a new post. It can not work when we are replying to other posts or we want to paste the macro to other third-party apps such as messenger apps (e.g., sharing between friends via messenger apps).

It will still work, you just need to:

  1. Select all text in the new topic
  2. Cut
  3. Close/abort topic
  4. Paste into existing topic.

See How to upload your macro. Instructions for uploading to an existing post are just below the main instruction.

I thought of this method. But it needs a few extra steps and works only for this forum. So I was thinking maybe someone has some script to automate this process. It will work also for other apps.

Here is a macro that makes it easy to upload to an existing post:

MACRO: Upload KM Macro to New or Existing Topic @KM [Pub]

Thanks a lot, @JMichaelTX, for making the macro.

I have created a simple macro myself. It creates a temporary folder. I need to save the exported macro to this temporary folder. After pasting, this temporary folder will be deleted.

This macro allows me to paste the macro to other apps. However, it seems I'm not able to directly paste the macro from the clipboard to the forum posts. So your macro will serve that purpose.

Here is mine:
Export Slected Macro, Copy to Clipboard, Delete after Pasting.kmmacros (7.9 KB)