Export macro as java script or apple script

Is it possible to export a macro as a java or apple script?
It may run faster, perhaps
It would help to share the macro with folks who do not have KBM.

No it’s not possible. But maybe the question should be ‘why is my macro running so slowly?’ Or ‘how do I speed up my macro?’

1 Like

I figured, but wanted to check. It probably would be against KBM business model/profit to do this, but one can dream :wink:

There are a lot of things Keyboard Maestro accomplishes that are simply not possible with one scripting language. So trying to export a macro as JavaScript or AppleScript just wouldn’t work because those languages don’t have all of the necessary tools to do everything a typical macro can do.

1 Like

No connection. It just wouldn't be technically possible.

( incidentally, FWIW, JavaScript has no connection with the Java language )

Hum, I wonder if @peternlewis has ever considered creating a free version of KM that could only run macros (i.e., not create or modify macros).

And if he did, I wonder if it would be an effective way to introduce KM to a wider audience (and presumably a subset would be motivated to purchase the full application).

1 Like

Great idea!

No, this is not even close to possible. Many actions do many things that are not remotely possible with pure AppleScript and even with JXA would likely be virtually impossible.

Certainly an action that could be done in AppleScript or JXA would run slower that a native application in almost every case.

It certainly wouldn't make a lot of sense to have Keyboard Maestro as some sort of development environment to produce distributable applets. And frankly, I can't see that as being overly useful anyway - people tend to have very unique macros with only a relatively small subset being appropriate for sharing.

Yes, but it just does not make sense. The complexity of doing that is quite high, and it really doesn't work as a viable model for much of anything I'm afraid.