Automating Sharing Macros or Actions to the Forum


Edit: 2021/11/25 22:52 CST

This macro was written for Keyboard Maestro 8 and the Safari of the day. Click here for a more modern macro – written for Google Chrome, Brave Browser, and Safari using Keyboard Maestro 10+.

-ccs


Hey Folks,

There are a couple of these macros on the forum.

@JMichaelTX has one somewhere, and there may be others.

Here's mine.

Sharing macros to the forum is a trifle tedious, so I've attempted to streamline the process.

My macro is designed specifically for replying and copies the relevant code to the clipboard for pasting into the Keyboard Maestro forum editor.

JM's macro has a few more options than mine and will be of interest to some.

This has only been tested on macOS 10.12.6 with Safari 11 and 12.

-Chris


Menu ⇢ Share to the Keyboard Maestro Forum v1.01.kmmacros (13 KB)

Macro-Image

2 Likes

image

Hey Folks,

Do you find the Keyboard Maestro Editor's Share to Keyboard Maestro Forum function cumbersome and/or confusing?

This macro is designed to run in Safari, Google Chrome, or Brave Browser – although you can adjust it to run in any Safari or Chrome derivative that's scriptable.

  • Select the macro(s) or actions(s) you wish to share to the Keyboard Maestro Forum, and run the macro.
     
  • The selected items will be uploaded to a new topic using the Keyboard Maestro Editor's share function and your web browser.
    • The relevant text will be copied from your web browser to your clipboard.
    • The new topic tab in your web browser will be closed.
    • You are now ready to paste the text into an existing topic.
    • Should you want to compose a new topic press the C key in any forum tab, and paste into the forum editor.
       
  • Version 1.04 – Uploaded 2021/12/15 15:00 CST
    • Now restores the enabled/disabled state of the selected macro.
       
  • Scroll up to Post #1 for a version that works with Safari.

-Chris


Menu ⇢ Share to the Keyboard Maestro Forum ⇢ Front Browser ⇢ v1.04.kmmacros (24 KB)

Macro-Image

5 Likes

Hi @ccstone - I just downloaded and tried your new version with a selected macro and it works really well! Thank you!

Just one small point: After running, the selected macro is left in a disabled state; not the end of the world but inconvenient.

(BTW: to anyone who's listening - make sure your browser is set to allow JavaScript from Apple events if you don't want to get egg on your face :smiley:)

1 Like

Hey @tiffle,

Thanks for the feedback.

@cdthomer gave me some as well, and I've got to ponder how to polish the macro for a bit.

-Chris

1 Like

Macro version 1.04 – Uploaded 2021/12/15 15:00 CST


  • Now restores the enabled/disabled state of the selected macro.

-ccs

2 Likes

Chris, super handy macro! Thanks so much for sharing. :grinning: I do have a suggested enhancement for your consideration.

I generally post macros and images as follows:


DOWNLOAD Macro File:
Hello World.kmmacros (1.4 KB)
Note: This macro was uploaded in a DISABLED state. It must be ENABLED before it can be run. If it does not trigger, the macro group might also need to be ENABLED.

Image • Hello World


If you added four (optional) variables to Menu ⇢ Share to the Keyboard Maestro Forum ⇢ Front Browser, it would save a few steps and ensure consistency. For example, if you like the format I use, the default values could be.


local_MacroAnnotation_prefix:

<mark>

local_MacroAnnotation_suffix:

</mark>
*Note: This macro was uploaded in a DISABLED state. It must be ENABLED before it can be run. If it does not trigger, the macro group might also need to be ENABLED.*

local_ImageAnnotation_prefix:

<details><summary>Image • %MacroName%</summary>



local_ImageAnnotation_suffix:



</details>

Chris, admittedly this might add a level of complexity you'd like to avoid. So maybe as one of the Forum Administrators, you'd prefer to add some hard-coded annotation. If you like that alternative idea, I would suggest embedding the image in a folding section as it makes it easier to browse forum threads.

Thanks for considering this suggestion.

Hey Folks,

I've updated this macro to version 3.00, and it now produces output in the format you see below:


Download Macro(s): Share to Keyboard Maestro Forum ⇢ Front Browser ⇢ v3.00.kmmacros (36 KB)

Macro-Image

Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.
System Information
  • macOS 10.14.6
  • Keyboard Maestro v10.2

  • As you can see the image is now enclosed in a pop-open menu.
  • Some explanatory notes are provided.
  • macOS system information and Keyboard Maestro version information are automatically collected and provided.

-Chris

5 Likes

Hi Chris,
I'm running this macro in Keyboard Maestro 10.2 on macOS 14.1.1, after running this Macro KM seems to be unresponsive. Have to force quit every time. What can i do to troubleshoot? This Macro used to work in Ventura with no problem but not in Sonoma.

TIA