AutoHotkey

**AutoHotkey** is a free, open-source scripting language for Microsoft Windows. It allows users to create keyboard shortcuts or hotkeys, fast macro-creation and software automation. It allows users to automate repetitive tasks in any Windows application. User interfaces can be extended or modified by AutoHotkey. For example, replacing the Windows control key commands with their Emacs equivalents. The AutoHotkey installation includes a help file. Documentation is available on the internet.

## Features

AutoHotkey scripts can be used to load programs, open documents, and issue keypresses and mouse clicks.

AutoHotkey scripts can also change variables and manipulate windows, files, and folders.

AutoHotkey scripts can be started by a hotkey. When the user presses a combination of keys, such as  on the keyboard, a script could open a web browser.

Keyboard keys can be remapped, such that pressing  might result in the active window receiving an en dash (–). The same keys could be disabled, such that pressing  might result in nothing happening at all.

AutoHotkey also allows for 'hotstrings' that will automatically replace certain text as it is typed. A typical use for hotstrings is expanding abbreviations. Typing "btw" could be made to produce the text "by the way".

Scripts can be started automatically when the computer starts. These could run in the background and could be used to write information to a logfile.

More complex tasks can be making custom data entry forms (GUI windows), working with the system registry, or using the Windows API by calling functions from DLLs. The scripts can be compiled into an executable file that can be run on other computers that do not have AutoHotkey installed.

The source code is in C++ and can be compiled with Visual Studio Express.

Memory access through pointers is allowed just as in C.

Some uses for AutoHotkey:
- Remapping the keyboard, such as from QWERTY to Dvorak or other alternative keyboard layouts.
- Using shortcuts to fill in frequently-used file names or other phrases.
- Typing punctuation not provided on the keyboard, such as curved quotes (**“**…**”**).
- Controlling the mouse cursor with a keyboard or joystick.
- Opening programs, documents, and websites with simple keystrokes.
- Adding a signature to e-mail or message boards.
- Monitoring a system and automatically closing unwanted programs.
- Scheduling an automatic reminder, system scan, or backup.
- Automating repetitive tasks.
- Filling out contest and freebie forms automatically (it could type in your name, address, and so on, automatically).
- Prototyping before implementing in another, more time consuming, programming language.

## History

The first public beta of AutoHotkey was released on November 10, 2003. It was  based on the syntax on AutoIt v2. It used some AutoIt v3 commands and the AutoIt v3 compiler. AutoIt v3 changed its license from GPL to closed source because of "other projects repeatedly taking AutoIt code" and "setting themselves up as competitors."

In 2010, AutoHotkey v1.1 (originally called AutoHotkey_L) became the main version for development. In late 2012, it became the official branch.

An alternative to the main program is AutoHotkey_H.

### Version 2

On December 20, 2022, version 2.0.0 was released. On January 22, 2023, AutoHotkey v2 became the main version.

## Examples

The following script will allow a user to search for a particular word or phrase using Google. After copying text from any application to the clipboard, pressing the configurable hotkey  will open the user's default web browser and perform the search.

The following script defines a hotstring that enables the user to type "afaik" in any program and have it automatically replaced with "as far as I know":

The example below makes  replace selected text in an editor with a quoted version of that text. It illustrates the use of functions, arguments and default argument values.

## User-contributed features

There are extensions/interops/inline script libraries available for usage with/from other programming languages:
- VB/C# (.NET)
- Lua
- Lisp
- ECL
- VBScript/JScript (Windows Scripting Host)
- Embedded machine code

Other major plugins enable support for:
- Aspect-oriented programming
    - Function hooks
- COM wrappers
- Console interaction
- Dynamic code generation
- HIDs
- Internet Explorer automation
- GUI creation
- Web services
- Synthetic programming
- Windows event hooks

## Malware

Some malware has been written using AutoHotkey.

Anti-malware products sometimes falsely identify AutoHotkey scripts as malware. These are called _false positives_.

## Related pages

- AutoIt (for Windows)
- KiXtart (for Windows)
- Winbatch (for Windows)
- Macro Express (for Windows)
- Bookmarklet (for web browsers)
- iMacros (for Firefox, Chrome, and Internet Explorer)
- AutoKey (for Linux)
- Automator (for Macintosh)
- Keyboard Maestro (for Macintosh)

## Other websites

- AutoHotkey Foundation LLC

## Infobox (software)

- **name**: AutoHotkey
- **logo**: AutoHotkey logo.png
- **developer**: Chris Mallett, Steve Gray
- **released**: (Chris Mallet)
 (Steve Gray)
- **latest release version**: 1.1.31.01
- **latest preview version**: 2.0-a105
- **operating system**: Microsoft Windows
- **genre**: Scripting language Automation Graphical user interface, GUI Utility software, utility
- **license**: GNU General Public License, GPL