Turn macro to code

Hi, is there a quick and easy way to convert a specifi macro to a script ?

I think we’re probably going to need a bit more info about what you’re trying to do and what you mean by “a script”.

Are you trying to make something that can be distributed to people who don’t have Keyboard Maestro? As far as I know that is not possible.

Are you trying to be able to trigger a macro from a script or other application? That is possible.

Tell us a big more about how you’d see this working, if you could get it working.

ah ok thanks that's what i was wondering.

Many of the things KM can do, can also be done with a pure AppleScript, and AppleScripts can be run on any Mac.

Also some of KM’s triggers can be reduplicated with other means. For example:

  • Save your AppleScript as a Quick Action workflow in Automator, and you can assign hotkeys.
  • Launch your script with a launchd job, which lets you assign periodic triggers.

How do you do this?

Since I have FastScripts, I use it when I need to assign a Hot Key to a script.

FastScripts works, too.

  1. Create a new Quick Action in Automator.
  2. Insert a Run AppleScript action and paste-in your script.
  3. Save the workflow in ~/Library/Services
  4. Assign a shortcut in System Preferences > Keyboard > Shortcuts

Screen Shot 2020-03-06 at 09.54.40-pty-fs8

Screen Shot 2020-03-06 at 09.56.20-pty-fs8

1 Like

5 posts were split to a new topic: Clear Writing