95 comments

[ 5.8 ms ] story [ 181 ms ] thread
Other than for the fact that it's open source, is there any reason people prefer AHK to AutoIt?

I haven't used either for some time now because I don't use Windows much these days, but I tried both and vastly preferred AutoIt. I'm surprised that the author stuck with AHK when he says "AHK v1 was very, very bad.", when surely AutoIt was a viable alternative?

Hmm. I checked it out and didn't really like it. Autoit feels dated, like something out of the early 2000s. By contrast AHK feels modern, fresh, and slick.

Sidenote: what is it with Windows developers and releasing freware that allows for commercial use but still holding on to not being open-source or at least source-available? The fact that this is still happening in 2023 is flabbergasting.

Not being peer-pressured into open sourcing your everything is a virtue of the Windows ecosystem.
Sure, but the weirdness here is that the program is fully free to begin with, for commercial use even.
It's worth remembering that free and open source are two completely separate factors. Something could have restrictive licensing despite being open source, while another could have very free licensing despite being closed source.

Open source by itself simply means the source is readily available for reading, nothing more and nothing less.

Why _should_ they? I can think of a dozen different reasons why not, flabbergasting is a bit of hyperbole.
In the modern software world, a basic trend is that if it's free and has no path towards monetization (ads, user data, premium editions/subscriptions, etc) it's open source.
Re: "Autoit feels dated"

Being old by itself isn't bad. What's an example practical downside of its old style?

Keyboard shortcuts
This is the first I've heard of AutoIt.
Couple of reasons: x5 times smaller executable, better peformance, much friendlier commune. AHK is fork of AutoIt.
Huh, I was under impression AutoIt was the enterprise (i.e. paid) version of AutoHotKey. I'm surprised to find out it's freeware. I never touched it because I thought I had to pay.
I loved AutoHotKey V1, in all its janky glory. Say what you will, it was better than batch scripting. I especially loved the primitive GUIs you could make with it.

Nowadays I don't have as much need for Windows automation, but I'm glad to see the overhaul. I definitely miss a similar program on other OSes.

Very good point. Many IT personnel and shops have found AutoHotkey to be way more powerful and flexible, than just plain batch. The GUI programs that could be made, can rival anything made in other languages (on Windows), while increasing usability or ease for users, by many orders of magnitude.
There's a few automations I want to try out, but does AHK still interfere with anti-cheat in games? I'm concerned if I forgot to turn it off (or if the anti-cheat just simply scans for a AHK executable), I'll be OOL.
Given closed-source nature of anti-cheat software it's probably impossible to tell for sure.

ACs do scan the system, some games IIRC refuse to run in a VM.

I also recall reading about some AC checking if the user inputs seem to be too perfectly timed to prevent botting.

Fortunately file system permissions are starting to evolve.
Solution is to write AHK script to launch the game and kill AHK executable.

If anti-cheat is okay with AHK in the system, but not running, of course.

I was looking at EMR data export options for a (now closed) client and it seemed pretty likely that at least one was doing exports using AHK, AutoIt or something else similar to simply script producing PDF reports. Possibly with screen scraping, but it might have been possible with nothing but scripted inputs and manual spot checking.

But the driving question is whether you can combine A̴̢̤̻͍̤͚̫͒͗̏͒̈́̑̈́͒͘͘̕͝͝u̸͎͉̟͋̾͂̏͝͝t̶̲̳̗̪͎́̔͗̅̓́͌ọ̵̌H̶̪͍̯̯͔̣͎̘̹̿̌͆̍̂̽̊̕͘͠o̶̢̨̦̭̣̤̙̞̘̥̣̫͓͇͛̈́͗̉̃͋̿̊͂̑̅̅͗͝ţ̴͔̻̳̱̫͚͍̳̞̯͋̊̃K̷̬̻̩̯̝̩̯̠̹̝͈͉̙̺̫͋̎̐̇̄̓̇̌̅̋̋̚͘e̵̫̓́y̵͔̌ ̵̱̠͈́̅̌̉̍̑͝͝w̴̦̹̮̦͕͗̂̓i̷̟̫̝͔͍̇͊̉̆͘͘ͅt̵̹̭͎͎̗͕̦͍̰͚̀͜h̴̡͕̮̼̺̟̜͇̺̦̣̑̈́̐̑̚ͅ ̷̛̥͙̲̦̗͓͎̳̖͍̣͓̽͊̊̄̏͒̅̓͌̓͝E̴͇̻̗̱̭̣̐̈͑́ͅx̷̡̨̜̳̯͚̳́̒̎͒͑͒͘͜ĉ̴̻͓͎̬̤̤̖̖̭̱͒̋̂̀̎̌̐͠͝e̶̢̛̮͉̰̣͈̣̊͛̕̚l̶̢̛̛̞͍̬̈̂͂́̂̌̿̇͒̋͝͝ to develop 'database' apps that make people's heads explode.

>A̴̢̤̻͍̤͚̫͒͗̏͒̈́̑̈́͒͘͘̕͝͝u̸͎͉̟͋̾͂̏͝͝t̶̲̳̗̪͎́̔͗̅̓́͌ọ̵̌H̶̪͍̯̯͔̣͎̘̹̿̌͆̍̂̽̊̕͘͠o̶̢̨̦̭̣̤̙̞̘̥̣̫͓͇͛̈́͗̉̃͋̿̊͂̑̅̅͗͝ţ̴͔̻̳̱̫͚͍̳̞̯͋̊̃K̷̬̻̩̯̝̩̯̠̹̝͈͉̙̺̫͋̎̐̇̄̓̇̌̅̋̋̚͘e̵̫̓́y̵͔̌ ̵̱̠͈́̅̌̉̍̑͝͝w̴̦̹̮̦͕͗̂̓i̷̟̫̝͔͍̇͊̉̆͘͘ͅt̵̹̭͎͎̗͕̦͍̰͚̀͜h̴̡͕̮̼̺̟̜͇̺̦̣̑̈́̐̑̚ͅ ̷̛̥͙̲̦̗͓͎̳̖͍̣͓̽͊̊̄̏͒̅̓͌̓͝E̴͇̻̗̱̭̣̐̈͑́ͅx̷̡̨̜̳̯͚̳́̒̎͒͑͒͘͜ĉ̴̻͓͎̬̤̤̖̖̭̱͒̋̂̀̎̌̐͠͝e̶̢̛̮͉̰̣͈̣̊͛̕̚l̶̢̛̛̞͍̬̈̂͂́̂̌̿̇͒̋͝͝

>AutoHotKey with Excel

This effect is called Zalgo text. I'm one of today's lucky 10000.

https://en.wikipedia.org/wiki/Zalgo_text

https://www.zalgo.org/

Initially, I hated auto hotkey and refused to learn another language, as lazy as that sounds.

On a whim I asked ChatGPT to generate me some scripts and it works perfectly (at least v1 of AHK). I’ve fully integrated AHK into my day-to-day routine and at this point I don’t think I can switch OS’a without something comparable.

Still have no interest in learning the language, though.

This is an interesting case where you really want to use AHK v2 now due to the improved language and built-in functionality, but ChatGPT is useless for it.
It was always good. I used it to make my own tiling WM for windows, removing decorations and putting windows at fixed coordinates. The syntax is now better, but that doesn't change much.

For the many people who say they don't like AHK, I don't think a lot have actually tried to use it. It may be "dirty" but it makes it easy to do most of anything you can think about (it can even call dlls)

Can you clue me in on how you did all that? I'd love some inspiration. That sounds really great.
The simplest way is 1 hotkey for specific position.

For my first attempt, using my arrow cluster, I divided my screen in roughly third: - top left: win+pageup - bottom left win+left - top center: win+up - bottom center: win+down - top right: win+pagedown - bottom right: win+down

Then you just remove the decorations and put windows there, using the coordinates you get.

You can also create toggles, here's a simple one:

WinGetPos, X, Y, Width, Height, A ;MsgBox, is at %X%`,%Y% if (X == 1800-640) { WinMove,A,, 0,0, 1800, 1200 } else { WinMove,A,, 1800-640, 1200-480, 640, 480 }

Extend the logic to use more (or less) of the 3x2 grid.

If you prefer to keep some windows floating:

; Get window style WinGet, S, Style, A if (S & 0x00C00000) { ; If not borderless, toggle all: ; 0xC00000:border, 0x40000:resize border, 0x00000200:WS_EX_CLIENTEDGE WinSet, Style, -0xC40200, A Winset, Alwaysontop, On, A } else { WinSet, Style, +0xC40200, A Winset, Alwaysontop, Off, A }

You can automatize more by hooking to events like OnMessage(WM_DISPLAYCHANGE, "displayChange") which will trigger the function when you move from tablet to portrait mode: just adapt the dimensions.

Look on the forums and you will find plenty of such examples. I've now moved to Linux and roughly replicated some of my setting using hyprland (wayland), but there are many things I miss from AHK

BTW, for the dlls, here's an example of how on Windows 10 the taskbar could be programmatically changed to small icons, then refreshed:

  DllCall("ntoskrnl.exe\RtlFillMemoryUlong", UInt,&area + 0, UInt,4, UInt,0)
  DllCall("ntoskrnl.exe\RtlFillMemoryUlong", UInt,&area + 4, UInt,4, UInt,0)
  DllCall("ntoskrnl.exe\RtlFillMemoryUlong", UInt,&area + 8, UInt,4, UInt,A_ScreenWidth)
  DllCall("ntoskrnl.exe\RtlFillMemoryUlong", UInt,&area + 12,UInt,4, UInt,Top)
  DllCall("SystemParametersInfo", UInt,0x2F, UInt,0, UInt,&area, UInt,0)
Think of that more or less like changing the CSS then sending `pkill -USR1 waybar`
In case you're interested in something low effort Microsoft's FancyZones[0], included in PowerToys and iirc Windows 11, has some basic window tiling.

It supports defining arbitrary zone layouts, switching between different layouts with hotkeys, snapping windows to them using the mouse or hotkeys, remembering which zone a window was in, snapping child windows/popups to zones.

It doesn't lock windows in place or remove window decorations unfortunately.

There's some other great stuff in PowerToys as well, they can all be enabled optionally.

* Bulk file rename in the context menu. Rename large numbers of files in a UI using regex/pattern matching.

* File lock viewer: See which process is preventing a file being deleted.

* PowerToys Run: basically spotlight or a system wide version of vscode's command bar. It can do calculations, find files, launch programs. Bound to a global hotkey of alt+space.

* Text extractor: like snipping tool but tries to use OCR to extract text from the capture region.

[0] https://learn.microsoft.com/en-us/windows/powertoys/fancyzon...

Flow Launcher and Fluent Search do a better job than the powertoys one. By the time Powertoys got a result I could've opened the program with the mouse. https://github.com/adirh3/Fluent-Search https://github.com/Flow-Launcher/Flow.Launcher

The Fluent Search creator is pretty active and available on Discord.

That's fair. I haven't evaluated any alternatives but the powertoys launcher can definitely be slow at times.
Give them a shot if you like the feature, it's worth it.
Just mentionned FancyZones in another comment above. I highly recommend you give a look at it!
One time I needed my ahk script to go much faster, looping over all pixels at 60fps or something^. So I wrote a function in C, compiled it, and copied the machine code from the object file into a literal hex string in the script. Then when the script ran it decoded the string into a buffer and called the buffer address with DllCall. This actually worked and was much faster as expected.

What's the point of wasm when you can just write your machine code to a buffer and call it. Psh, kids these days.

^: https://news.ycombinator.com/item?id=23160930

> Then when the script ran it decoded the string into a buffer and called the buffer address with DllCall. This actually worked and was much faster as expected.

You've just discovered manual JIT ;)

   I love Autohotkey so much that it keeps me on Windows. It’s the best GUI automation tool out there. 
Amen. This is exactly it for me. I'm quite lost without AHK. I have yet to switch to V2 however.
I feel similarly about hammerspoon [1] on macOS. Not a GUI tool, but Lua is a very easy language to learn.

[1] https://github.com/Hammerspoon/hammerspoon

Lua itself was easy enough to learn, but it lacks a way to interrogate objects similar to dir(variable) in Python. There's iterating over pairs(variable), which works on some, but not all variables, and it's up to each module to implement it's own version of that, which is a mess.

I couldn't live without my hammerspoon GUI hacks on Mac (like click and drag to move/resize windows from Linux) though.

Yeah my setup is pretty basic, but it's absolutely killer IMO :)

- Cmd + Ctrl + <I|O|U> -> Move active window to monitor I, O, or U, respectively

- Cmd + Ctrl + <H|J|K|L> -> Move active window to <left|bottom|top|right> half of screen

- Cmd + Ctrl + <C|V|T|...> -> Open heavy-use application denoted by C, V, T, ...

That plus vim mode in Chrome, VSCode, and Obsidian has me _flying_.

Why do I have to learn Yet Another Language to use this? Why can't it just use JavaScript or python for scripting?
I think you have to look at the time frame and history of when AutoIt and then AutoHotkey came out. What they were doing on the Windows OS was not so feasible with JavaScript. But AutoHotkey, and AutoIt to a lesser extent, have always used JavaScript in a supplemental way when possible.

As for Python (on the Windows OS) it doesn't come preinstalled, is far larger, less specific to automation, more confusing, and less convenient. There has been numerous Python attempts and projects to copy or make something similar to AutoHotkey and AutoIt, but they never caught on as much. AutoHotkey and AutoIt had already gained a reputation and became more firmly entrenched as the tools to use for automation tasks on Windows.

AutoHotkey has a huge support forum history in addition to great documentation. The language it uses seems terrible and confusing, almost as bad as bash! But if you want to do something chances are it has been done and there is example code already there to get your started, a lot like bash. That is worth a lot more than it having a better language at the end of the day.
JavaScript. To script Windows. Whoa. AHK is directly calling Windows' DLLs. We don't need another translation layer, and Python already has some libraries to accomplish similar tasks.
there's an ahk or ahkpy module to call it from Python.
Reciprocally, it's just amazing how much better AutoHotKey is at scripting the computer is than everything else is. The language was clearly never the reason why AHK persisted.

There's works like AutoPy (https://github.com/autopilot-rs/autopy) and AutoPilot-rs (https://github.com/autopilot-rs/autopilot-rs), but they offer like 1/100th the capabilities AHK does.

Personally I think this kind of computer-control is the perfect environment for teaching computing. Rather than writing apps or webapps, I feel like the idea of just writing code to do what you the user would do anyways, but better, is a fantastic introduction to computing & programming. In my ideal world, we'd have an EVE Online server that specifically re-enables the game-client's python interpretter (and periodically does total wipes), so folks can learn to program by scripting not just their desktop, but a complex & interesting game, via it's rich api.

I actually started coding that way. Back then I automated some parts in video games like pressing a key to pickup items. There was even a GUI designer which was pretty easy to use. For me it was AutoIT rather than AHK but if I remember correctly they're quite similar.

  > Personally I think this kind of computer-control is the perfect environment for teaching computing. Rather than writing apps or webapps, I feel like the idea of just writing code to do what you the user would do anyways, but better, is a fantastic introduction to computing & programming.
AHK is how I got into programming. I started with a few hotstrings, slowly added more functionality, a GUI, etc. While writing a specific tool, I learned about ReGex, and would often refer to the RegEx table in the AHK docs.

Eventually, I attempted to write a tools to audit network device config with AHK, and a colleague said "why don't you write it in Perl". In looking up Perl, I learned about Python and kinda them at the same time (though interestingly, I still prefer Perl to this day). I also never realised RegEx was a thing people struggled with because I learned it almost immediately after getting into "programming", so I was just part of the learning process.

All in all, I credit AHK with getting me into coding.

Is there anything equivalent to Keyboard Maestro on Windows? https://www.keyboardmaestro.com/main/

I tried using AutoHotKey... I was appalled by the experience.

You mean pay for something that could be free?
I love Keyboard Maestro for all my Macs. It takes a while to learn all the quirks, but it does heavy duty work for me every day. I am not aware of any equivalent for Windows.
I love autohotkey.

It has no schema constraints, you can write all code in a single line if you want.

IT NEVER HAS INDENTATION issues.

It never wants you to type in a certain way. Just write and do.

It never assumes, just does the commands as is.

Beginners into programming must learn this. Kids must be taught this. It gets a novice excited to use computers and with its simple syntax, it can be taught in a matter of hours.

Autohotkey was always good. One of the killer windows apps by a big margin vs competitors. I've had a AHK script I've been adding to for 10 years. One of the first things I put on a new computer.

#1 most used feature?

remapping caps lock to do wide text for easy memeing

but do you remap space to wide text?

EDIT: Goddamn it, HN remaps U+3000 to regular space.

I took a business class where one assignment was to run a simulation program and try to find the combination of factors that gave the best result. Professor said we could run as many combinations as we liked and he would use the average of each simulation to see who did the best. I had AHK so I ran every simulation combination once and then wrote a script that ran the best outcome over and over to make my initial attempts statistically insignificant. I had the highest average score for that assignment.
> It’s the best GUI automation tool out there.

I think PyAutoGui is pretty good.

What I really want to know is , what can I use AHK for? Seems like for most "programming"-type things I reach for Python or C#.. these days it's been PowerShell, and I don't know what to use AHK for.

Would love suggestions.

I have a program in my taskbar. I often need to right click on it, navigate to a particular menu and select an item.

I wrote an AHK script for it and bound it to a keystroke.

A good place to start is hotstrings:

    ::;shrug::¯\_(ツ)_/¯
If you type `;shrug` anywhere AHK will replace it with `¯\_(ツ)_/¯`.

Some things I have hotstring'd: my ACH routing number, my home address (for filling out forms and sending to friends), useful unicode symbols like — and →, the current date in both American and ISO format, common search prefixes, and my personal zoom link.

I use Alfred's snippets for those, and they work perfectly :)

  ::tflip1 (╯°□°)╯︵ ┻━┻
  ::tflip2 ┬──┬◡ノ(° -°ノ)
  ::shrug ¯\_(ツ)_/¯
and ::email for my email address
Win+; gets me (´◡`)(●'◡'●)╰(°▽°)╯: .。. o(≧▽≦)o .。.:(/ω\)(^///^):-)^_^:-Dಥ_ಥ(┬┬﹏┬┬)ᓚᘏᗢ
emoji/symbol pickers are great for rarely used symbols, otherwise you can't beat key chords without a context switch to another window. It's also easier to customize AHK scripts as you go. You can also have context-sensitive shortcuts (e.g., different things in different apps), OS pickers aren't that smart
Are hot strings case-sensitive? Would be nice to always replace "THe" with "The".

I tend to hold the shift just too long in general. Would be nice if I could replace "[A-Z][A-Z][a-z]+ " with the fixed second cap automatically every time.

Yup, `:C:THe::The` will do it.
You cant compare pwsh, c# or python with AHK - the quick on-boarding experience and easiness of use is on another level. You can make very big improvements in your daily workflow with just 1 line of code. Its that awesome. I use it in last 20 years for various purposes, be it speeding up web development or fixing video player quirks.

Language was never good, but it was good for what it was designed for, 5 to 10 liner scripts, but then people liked AHK so much that they used it as general purpose langauge (myself included). For example its still the easiest way to create a GUI, in just a couple of lines of code you can have meaningfull tool window which does things.

With AHK2, the language is way better and consistent (cudos to Leixkos and this decade+ long effort), and it makes other people able to create good libraries for others in it.

You should not miss it. For me, not using it is like not knowing Regular Expressions or some HTML.

shortcuts and shortstrings, no python/C#/pwsh will get you there (though for some lower level shortcuts that only involve rebinding keys to each other there are contenders)

Then also controlling some apps here and there, AHK is the fastest tool to get there

I have emacs, terminal, and chrome bound on a hotkey so I don't need to fiddle with alt tabbing. Also have custom mappings for volume control (way easier than hitting the laptop's default fn-f2/3 combo) and three pre-determined screen brightness levels that set the brightness perfectly when my ambient lighting is dark/normal/bright.

Also I have mappings that basically clone all the keybindings from MacOS that I cannot live without, so alt-t is new tab, shift-alt-[ is prev tab, alt-q closes application etc.

I use it mostly for automating repetitive actions that cannot be otherwise automated with bespoke scripts. A simple example is I needed to test drawing 255 selections on a screen. So I just wrote a couple loops to automate drawing tons of triangles while I was eating lunch. But I've written ones that process tons of files in an application and go through all the sub dialogs to see if they were functional.

It is a nice tool for this because it works on anything you can see (and some things you can't) so if the software can be used then you can automate it. Sometimes you have to fall back on the image recognition sledge hammer but there is always a way out.

Aside from text snippets and invoking some actions, I haven't really discovered what I can use AHK for.

Any more complex examples that doesn't work in python / c# that easily?

Is there something like it for Linux?
Autokey is a good alternative. But it depends on your window manager, for example, you might benefit from xbindkeys or i3 config.
I am highly surprised how many times i3 is mentionned in all the comments.
xdotool + bash and other utils.
AutoIt is also great especially for quickly prototyping GUIs.

I recently built a proof-of-concept for a modernized method of interacting with RTS cameras[0], which unfortunately could not be achieved with frameworks like SDL due to their abstraction obscuring some of the native OS functions needed to create my idea.

Using AutoIt lets me basically just treat it as a minimal-boilerplate sandbox to make DllCalls. This also means that I could directly listen as well as post raw device messages. For example, I implemented an inertia-based cursor script that basically lets you use your homerow vim keys like it's a trackball[1], which I now use everyday whenever I'm not with my ThinkPad.

[0] https://github.com/EsportToys/NaturalEdgePan

[1] https://github.com/EsportToys/TPMouse

How does AutoIt compare to AHK? I realize AutoIt is not open-source (free EXE), but besides that what are the key differences? The AutoIt VisualBasic-like language looks easier to learn for those of us who grew up on Microsoft. Can anyone confirm that?
I've got some apps which outgrew what ahk/autoit can realistically provide for me and moved everything to be based on FlaUI (C# library) instead. I'd really recommend that if people hate the weird custom scripts.
Does anyone have any ahk file(s) they would like to share? I have (to me) a basic setup but I’ve never gone very deep on it, but I’d like to. As a new-to-windows user I REALLY miss some of the Linux key commands I’ve set up in i3.
Not a helpful contribution to your first question but I agree with the i3 comparison. Trying to get my volume buttons working on i3 reminded me of using AHK to reconfigure the numpad with numlock off to media control on one of my old windows desktops
I've been a daily i3 user for 6+ years. My initial exposure to tiling window managers was through Ion 2 (https://en.wikipedia.org/wiki/Ion_(window_manager) maybe ~15y ago. Back then I was still using Windows on my primary computer for various reasons, but after playing around with Ion 2 it started to feel cumbersome.

I had been using AutoHotkey for some simple macros before and after reading the documentation with more thought, I set out to mimic some aspects of the tiling WM experience. The outcome was this script https://gist.github.com/ristomatti/f075020025cf870aaf8f73a93.... It looks like a quick hack now (as it was) but I remember confirming it still worked on at least Windows 10 (it was written at the time of Windows 2000 IIRC).

The script is badly documented and I barely remember writing it but what it should support is:

- focusing adjacent windows directionally using win+arrows

- win+left click to move a window around based on a 3x3 grid (click top left moves to top left)

- win+right click to resize a window to grow in the direction of the clicked region of the window

- win+middle click to select a specific window, then win+middle click on an empty space on the desktop to move and resize the window to fill in the gap

- support multiple monitors

Back in the day when Facebook games were all the rage, my wife got hooked into Farmville. After getting roped into it to help her somehow (gifts or boosts or something, I don't remember), I was struck by how repetive the actions were. Found AutoHotKey, and soon I had a near fully automated farm. Logging in every couple of days to make sure a popup hadn't messed up the pattern, my farm was soon doing quite well.

My wife, completely put out that I was 'cheating the game' decided that we didn't need to keep up with Farmville anymore. AutoHotKey saved me a lot of time.

Reminds me of a time my gf got addicted to Diablo. Het passion was mining high end rare items and posting pictures on the net. Save editor I found to "help her out with the website" cured Diablo addiction, and my sex life for a while.
this reminds me of yossi kreinin's 'i can't believe i'm praising tcl' https://yosefk.com/blog/i-cant-believe-im-praising-tcl.html

tcl, like bash, makes some of the same decisions as autohotkey: literal strings are unmarked, while variables to use the value of are marked, and you can invoke commands without parentheses around their arguments

yosef makes a good case that these are the right choices for a command language only occasionally used for scripting, like tcl, but i wonder if they were also the right choices for ahk, however much they may have screwed up the details

like, requiring commas between arguments is probably bad? especially between the command name and its arguments? pv-wave idl is the only thing i've ever used that made that mistake

from the degree of annoyance my wife is having with the & required by scanf in c (she knows more lua than c but the class she's taking is in c), i predict that ahk 2 will not be very popular with ahk 1's audience, who mostly don't know any other programming languages

i'm interested to know what the best alternatives to ahk are for x11 and wayland, even if they do require being a programmer (i am)

As near as I can tell nothing on linux matches AHK's wide ranging ability. It is probably the thing I miss most about leaving Windows. I've used xdotool but it isn't even close.
Though it's true that AHK v1 was a bit eccentric or wonky, it did a really good job at its primary purposes, among them making it easy for non-programmers and newbies to use it.

I've talked to and read about so many people that needed to do programming tasks, but couldn't or were intimidated by conventional programming languages, that found AHK v1 a lifesaver for them. Many tend to forget or not factor in small businesses, IT personnel, architects, office workers, etc... People who are not trained programmers or whose companies will not pay for the services of real programmers to make job tasks more efficient. That's where AutoHotkey has found a way in, to the joy of many of its users.

While AHK v2 is an improvement in many ways, I think it's also important to not lose sight of why lots of people fell in love with AutoHotkey in the first place. Making programming accessible and easy to use, to solve the problems they are dealing with.

The first (and only) time I used AutoHotKey was when I was playing the OG Farmville on Facebook (when they still had games).

I made a script that automatically planted and harvested seeds on a specific shape of a plot.

After that I really haven't found a use for either AHK or Hammerspoon

AHK was my go to solution for the longest time, and I had some amazing shortcuts, but I often struggled with writing more complex scripts because of the language not working the way I wanted it to. I might try again now.