AHK to Keyboard Maestro translater

Hey all, long time no see!

Since last time I was here I've got my first job "yay me!" but alas we use windows "nay me!".
At work of course I've been using all the programming tools I can get my hands on. Autohotkey is of course a major part to working with a lot of the applications because many are either impossible or very difficult to automate (e.g. Infoworks ICM).

Babbling aside one thing has been bugging me a fair bit. I work at work with windows make tonnes of cool useful macros, get home and can't use any of them - because at home I have a mac.

Knowing already that KM will likely not include a code based editor I've been thinking recently that I might try to make my own which can compile into Keyboard Maestro - using Keyboard maestro - so KM users could write code in AHK and port them to Keyboard Maestro (although I know much functionality will be absent in both directions).

Anyway so I started looking at KM in a text file recently and it seems far more complicated than I imagined...

I'm not really sure what one would even be called... A compiler? Anyway, if I ever do start on this project I'll be sure to make it open source - it will never be finished otherwise... Community projects are always way better than solo projects I've always found...

Has anyone had any experience with "translators" like these? And would anybody else be interested in the project? :stuck_out_tongue: I'm a typical nerd so my interest will probably fluctuate with this project... xD I often end up leaving everything to someone else...

Thinking more about it now it may be much much harder to do this kind of thing without a dictionary because windows keyboard shortcuts are far different from Mac keyboard shortcuts. E.G. Cmd+V and Cmd+Tab compared to Alt+Tab and Ctrl+V… And that’s not even taking into account differences in software…

Still I think a keyboard maestro scripting language would be extremely useful and one could try to keep it as close to AHK as possible - just for ease of porting.

# = Cmd
! = Alt

  • = Shift
    ^ = Ctrl

for instance

I would be very surprised if you could translate AutoHotKey macros to Keyboard Maestro macros in any kind of automated way for anything except the most basic of macros.

The macro systems are very different, and the platforms are very different, its hard to imagine many scenarios that would translate even conceptually.

Yeah. I think at the time I was under the impression that “Cmd was a replacement for Ctrl” and I had also completely forgotten about the lack of “alt menu searching” native to windows but absent on mac, except for the Ctrl+F2, Ctrl+F3 and Ctrl+F8 which are entirely different…

You could translate most of the actions from Keyboard Maestro to Autohotkey and visa versa but whether the macros would work as intended… would be unlikely I assume. The best bet would be to stick to “image search macros” but even images from various mac versions of software to windows versions of the software look different…

Alas, twas a nice thought. That being said a scripting language for KM would be advantageous, at least for me, so I might try to work on a KM based coder… We’ll see xD

I guess one could at least include all these shortcuts into a translator:

where applicable.