Programming language for KM

I have found KM is very powerful and can be used to write complex automation.

Is there any plan to release it’s own language too? While creating a complex automation, I have found KM to be hard to work on with many steps.

Just thinking out loud - about my own complex workflows:

  1. Sometimes I can consolidate steps into fewer.
  2. You might be able to replace sets of steps with e.g. Javascript or AppleScript

Item 2 is an example of where you could deploy programming today.

One other thing: I’ve learnt (the hard way) to inject comment “steps” into my workflows.

Not really, no. It’s possible, and I certainly could create some sort of script language. But much of the power of Keyboard Maestro actions comes from the UI of the action, the popup menus, etc.

If you want a scripting language, it’s probably better to just use JXA, and then have that ask Keyboard Maestro to do any of the tasks that it does that are hard to do in scripts. It’s easy enough to wrap the XML for an action in a function, and then you’re using a well known language.

Maybe one day I’ll do something to expose the actions directly to JXA or something like that, but definitely not this year.

Thanks for the input Martin and Peter.

I agree the real power of KM is it’s UI which makes it very easy to get started. I had initially used it for simple automation and later found that the name Keyboard Maestro is misleading. It sounds like it’s just an advanced TextExpander kind of tool but it’s a whole automation suite in itself and can do a lot than the name implies :slight_smile: Hats off to provide such an excellent software.

I liked the suggestion of learning JXA and I’ll look into that too. I also suggest to bring in something in the KM to leverage its real power to create something complex without getting lost in the myriad of steps blocks.

@nexgen, I don’t know your level of programming knowledge - so maybe AppleScript would work better for you than JXA.

But personally I’d be trying learn yet another variant of Javascript (JXA) - if I could find good enough recipes on the web. (I think I’m agreeing with you.) :slight_smile:

I have been programming since a long time but as a hobby only. I know various programming languages but don’t get involved in deep programming.

I also did a quick search in udemy and lynda for jxa and couldn’t find any video courses of it.

I’m also thinking what to learn. AppleScript or JXA. Looks like jxa is the future.

This has some resources on learning JXA. :slightly_smiling_face:

2 Likes

Given that, you will probably find JXA easier to learn and use than AppleScript.

This might help you get started with JXA:
JXA Resources