5 ms·
Really nice at first sight. I'm getting melancholic vibes of AutoHotKey reading the docs, which was arguably my first entry into professional programming. Know
by endymi0n 5y ago
Really nice at first sight.
I'm getting melancholic vibes of AutoHotKey reading the docs, which was arguably my first entry into professional programming. Knowing nothing about coding, I built a service desk automation back then — with (network file-) shared hotkeys and a real GUI, all in one single file... good times.
Anyway, ever since switching to MacOS more than a decade ago, I've always been searching for an AHK analog for those simple keystroke automations, text-based, with just enough of a glue language to hold it all together — Automator never quite cut it for me, after wielding the full power of AHK, it always felt too limited, rigid and clicky-colory.
Even though I don't have immediate use cases for it anymore, it makes me very happy that I know where to go back now!
- artdigital 5y agoHave you tried AppleScript scripting? You can glue applications together and even use JavaScript if you’re not a fan of AppleScript
- endymi0n 5y agoDid some, but the syntax wasn't my cup of tea. The _really_ great feature of AHK to me was having the triggers and the actions all in one place though, which is something I couldn't really replicate with AppleScript that only has the actions, with the triggers in Automator. So with that runtime you could easily just write whatever would happen if you press which key combo (or do cronjob-like things managed by the runtime) and then write what happens inline. Write it all to a single script, copy it to a coworker's computer, run it, several dozen key combos just work now. That's something I couldn't manage to pull off in AppleScript or Automator, but then again maybe I was just too dumb.
- 1123581321 5y agoTry Keyboard Maestro or BetterTouchTool. They remind me the most of AHK out of all the Apple options. I also really like Hammerspoon. The desktop automation scene on macOS is strong.
- artdigital 5y agoI use KeyboardMaestro to run my applescript connection as well. It's the missing glue to easily assign hotkeys to scripts or make them automatically trigger when something on my mac happens
- blondin 5y agodo you mean simple text-based replacements and keyboard shortcuts? as opposed to full automation? you can set those in the keyboard settings in system preferences. i have used the text replacement tab a lot in the past. i used it to auto-insert smileys and text snippets on various platforms. i haven't used shortcuts much though. you always end up with complicated shortcuts so you don't conflict with your apps.
- blacksmith_tb 5y agoI have been enjoying espanso[1], which at first glance is just a text-expanding keystoke saver, but can run shell scripts when it's doing its thing. So I can type :extip anywhere and it will curl ipinfo.io then pipe the json response through jq -r and leave my current external IP in whatever app I was typing in. 1: https://espanso.org/ https://espanso.org/
- smoldesu 5y agoHoly cow, espanso looks bonkers. Open source, completely cross-platform, fully extensible... it ticks all the boxes. Might just have to try it out tonight!
- stevekemp 5y agoI had a similar reaction, although annoyingly it seems that on my Debian system it doesn't expand text inside gnome-terminal. Inside Emacs, Firefox, and similar it does work but if it's not "everywhere" I suspect I'll get frustrated.
- dsizzle 5y agoWas in the same boat 10 years ago. In my quest to replace AHK on MacOS, Hammerspoon is where I ended up. It's great.