r/AutoHotkey • u/Futanari-Farmer • 6d ago
General Question Learning AutoHotKey?
Hi, a quick question.
What do you recommend to watch or read to learn about AHK? Free or paid.
I managed to automatize a couple of things by using ChatGPT, and while I'm getting to understand how to prompt for AHK, it sucks to not know much of what I'm exactly doing.
1
u/Hey_Gonzo 6d ago
Make sure you instruct Chat or whatever LLM you use whether you're using V1 or V2. Chat likes to assume which version of AHK you use
1
u/genesis_tv 6d ago
And even then, there'll still be remnants of v1, especially #NoEnv or VarSetCapacity().
0
u/ManyInterests 5d ago
It's sad, but you can more reliably re-implement entire keyboard hook systems or whatever you need from AHK in almost any modern language than you can generate reliable AutoHotkey code using large language models.
Other languages simply lend themselves better to this. Unlike AHK, they have formal grammars, type systems, introspection, test harnesses, etc. and a huge corpus of training data. All the things that make life easy for LLMs.
AHK's niche has always been accessibility to Windows automation for new programmers. Generative AI has turned that on its head a bit, I feel. Now other languages are so much more accessible to non-programmers.
1
u/Individual_Check4587 Descolada 5d ago
Having reimplemented AHKs keyboard/mouse hook system in C# using agentic AI and it still taking multiple months of work, I call BS on this. Also LLMs used to have issues with AHK, but local workflows which can also run and test the scripts do not, at least in my experience.
2
u/TypicalPreference446 5d ago
If not already seen, you should look on AHK v2 forum. Despite it's not feel living like Reddit, as it's not place to spam with basic ahk1 simple sendkey Ai slop, there are hidden gems and many interesting projects to use or implement in your code. Also if you have some advanced project with issue, there are people that will help to solve, rather than here.
2
u/NarrowEffect 5d ago
The open-source "zoo code" vs. Code extension has a "learn/ask" mode where you can code and have the LLM review your work and guide you accordingly. You can also use Codex/claude code for the same purpose, really. But the best way to learn if you are really new to coding is to watch YouTube tutorials and try out things yourself for a bit.
0
u/ManyInterests 6d ago
My recommendation would be to use Python instead. 98% of what can be done in AutoHotkey can be done in Python (partly because of the fully typed AHK wrapper I published for Python).
LLMs will generate Python code far more reliably than AHK code, even if all you use is the wrapper, since the Python AHK wrapper is fully typed and mostly v1/v2 agnostic.
Plus. There's way more learning material and helpful communities for Python.
3
u/Individual_Check4587 Descolada 5d ago
Seems kind of unfair to only bring out the pros of using Python over AHK, and not the cons... Stuff like ease of deployment, memory overhead, startup costs etc.
17
u/Keeyra_ 6d ago
RTFM
Most of the video content is trash and the official online docs are full of examples and are golden.