AutoHotkey

Topics related to AutoHotkey:

Getting started with AutoHotkey

AutoHotkey is a free, open-source custom scripting language for Microsoft Windows, initially aimed at providing easy keyboard shortcuts or hotkeys, fast macro-creation and software automation that allows users of most levels of computer skill to automate repetitive tasks in any Windows application. User interfaces can easily be extended or modified by AutoHotkey (for example, overriding the default Windows control key commands with their Emacs equivalents). The Autohotkey installation includes its own extensive help file with an always updated web based version.

You can write mouse or keyboard macros, remap keys, create hotkeys, expand abbreviations, change clipboard contents, and make executables to run hotkey scripts on computers without AutoHotkey installed.

Hello World

Hotkey Scripts

Use functions instead of labels

AutoHotkey used to heavily rely on labels until version 1.1.20. It's reliance on labels had very serious disadvantages. The main one being that labels usually execute in the global scope meaning that any variable defined within a label will be globally available. This sounds great until you realize that for example you can't just use other peoples libraries without making sure that their variables don't interfere with yours.
Working in the global scope when not necessary is simply bad practice.

So this is where functions come in. As of version 1.1.20, every AutoHotkey command that accepts a label-name as a parameter, now alternatively accepts a function-name.

Arrays

Built-in Variables and Functions

Open a File in a Script

Input Field