Lurker News
Hello HN,

this is the first functional reimplementation of AutoHotkey [1] for Unix-like systems, as far as I am aware. Half the commands are still missing, but everything important is done, as I have worked a lot on it over the past two months. Converting scripts into stand alone binaries is also supported. Hope this will find some adoption eventually. :-) - This implementation focuses on v1.0-like classic syntax from 2004 (!). This is a significant subset of the popular current v1.1 syntax from Windows (AHK_L). The reason this does not (yet?) target the full Windows spec is how complex it is. Notably, there's also another ongoing project which targets v2 called KeySharp [2].
If you are not aware of what AHK is, it is an easy but capable scripting language for automation and Hotkeys, and all sorts of visual things like GUIs.
If you want to learn more, there plenty of info on the repo, the docs html, and there's an active AHK Discord too, and I am personally also checking the forums and HN of course.
[1] https://www.autohotkey.com/ [2] https://bitbucket.org/mfeemster/keysharp/

Comments (183) 43 threads

Earlier comments
account-5#
Like another commenter I learned to program with AHK. I've used it for automating dispetate software that didn't natively talk to each other, automate MS Office tasks via COM objects (think VBA), make use of DLLs for certain tasks, and obviously for text expansion and replacement.

I've always looked for software similar for Linux but nothing comes close.
The documentation is second to none as well.
Anyway I'm really happy to see this, well done I hope it all goes well.

infogulch2 replies#
I learned programming with AHK back in the day.

One neat feature is that you can bundle a bunch of scripts with the runtime into a single file binary for easy distribution. If AutoHotkey runs on multiple operating systems, maybe combining this with cosmopolitan libc into an 'αcτµαlly pδrταblε εxεcµταblε' would let you bundle a script and use it across different OSes. That'd be pretty fun.

themodelplumber1 reply#
Interesting, I'm curious though, how does one interact with a bunch of scripts that are in a single binary?
infogulch#
Ah I could be a bit more clear, it's more like a script and its dependencies. That said, you can combine a bunch of different utilities into a single script and select between them at runtime (cli, gui, etc) or even have them running in parallel in the same runtime without too much trouble, though you have to be careful since some scripts make cavalier use of the global namespace.
phil294#
Yes it's awesome and works on both platforms. But these are two different, independent runtimes both highly dependent on their target systems, so there can be no cross-os binary. For that, maybe ahkx [1] (abandonware) could be feasible because it builds on Wine, or, much rather, KeySharp (linked above).

[1] https://github.com/tinku99/ahkx

keybored1 reply#
The state of GUI automation and keyboard remapping on Linux is pretty meh. AutoHotkey seems pretty bespoke but it might be the best option right now.
dustractor1 reply#
I completely agree. Windows had a drag-and-drop keyboard mapping utility twenty years ago. And Mac OS has automator and applescript, with capabilities windows and linux can only dream of since it requires taking a top-down approach with your language and your compiler and basically forcing people through the narrow gates of xcode so that all the compiled binaries get their dictionaries for interfacing with the osa scripting stuff
anthk#
Meh. OSX and Windows can dream upon upgrading everything with Unix/Linux utilities.

Half of these crap can be solved with xdotool/wmctrl and some scripts. Everything else it's maked to be scripted. Cron, package managers, X11 events, notifications...
One guy posted here an smart automation menu sequence to create a jar from a class within Eclipse. Any competent Unix programmer would create that for Scite, Gvim, Emacs or whatevers with an external script (man java and man javac, FFS) in seconds.

Load more comments