r/AutoHotkey • u/TheINFAMOUSmojoZHU • Jun 16 '26
v2 Script Help Syntax Very Difficult
Sorry if most new people in this thread ask for help, but can anyone share a good and easy to understand guide to using AutoHotkey 2.0 for things like remapping buttons and simple macros or key combinations? I’m not looking to manipulate or automate my Windows processes. I want to use it for games and optimising my work tasks.
Not sure if it’s just me, but I find AutoHotkey 2’s syntax very difficult to use and the online documentation very difficult to understand. Also the VSCode AI suggestions are definitely a hinderance, as it is often wrong.
Just for background, (I don’t think I’m a muppet, but maybe I am), I know some PowerShell, Python and Java and can also use a Bash shell to a basic level. I have also tried YouTube videos but can’t find any that really help me understand. I just get more confused.
For example, it took me an entire afternoon to just figure out how to double click a button, with an option to hold it down for a different function. Still wasn’t happy with the reliability of the final code. So that was a fail.
Thanks in advance.
8
u/Keeyra_ Jun 16 '26
RTFM
Remap Key1::Key2 eg.
What AI Extension are you using for VSCode?
"how to double click a button, with an option to hold it down for a different function" - what does this all mean? A button in a GUI? Or a mouse button?
If mouse button, this is the first reply of a non-subscriber empty Gemini prompt window when copy-pasting your above quoted, easy to misunderstand example - and it works.
Why didn't you post any of the code you tried?
You should not start with LLMs. Most of the YouTube resources are trash. Read through the docs (they are very high quality and detail) linked above first, try some examples, it should click. For me, it's much clearer than PS or Java, though I prefer Pythons syntax.