AutoHotkey is a free, open-source custom scriptinglanguage for Microsoft Windows, initially aimed at providing easy keyboard shortcuts or hotkeys, fast macro-creation and softwareautomation 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).[3] The AutoHotkey installation includes its own extensive help file with an always updated web-based version.[4]

Contents

AutoHotkey scripts can be used to launch programs, open documents, send keystrokes and mouse clicks and movements.[5] AutoHotkey scripts can also assign, retrieve, and manipulate variables, run loops and manipulate windows, files, and folders. These commands can be triggered by a hotkey, such as a script that would open an internetbrowser whenever the user presses Ctrl+Alt+i on the keyboard. Keyboard keys can also be remapped or disabled, such that pressing the letter q, for example, might result in the computer receiving a letter r, or nothing at all.[6] AutoHotkey also allows for 'hotstrings' that will automatically replace certain text as it is typed; the most typical use for hotstrings is expanding abbreviations, such as assigning the string "btw" to send the text "by the way" when typed, or the text "%o" to send "percentage of".[7]

More complex tasks can be achieved with 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.

The first public beta of AutoHotkey was released on November 10, 2003[9] after author Chris Mallett's proposal to integrate hotkey support into AutoIt v2 failed to generate response from the AutoIt community.[10][11] So the author began his own program from scratch basing the syntax on AutoIt v2 and using AutoIt v3 for some commands and the compiler.[12] Later, AutoIt v3 switched from GPL to closed source because of "other projects repeatedly taking AutoIt code" and "setting themselves up as competitors."[13]

In 2010, AutoHotkey v1.1 (originally called AutoHotkey_L) became the platform for ongoing development of AutoHotkey.[14] Another port of the program is AutoHotkey.dll.[citation needed]

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 ⊞ Win+g will open the user's default web browser and perform the search.

#g:: ; Win+gRunhttp://www.google.com/search?q=%clipboard%Return

The following is an example of the script required to create the hotstring "afaik," which is automatically replaced by "as far as I know":

::afaik::asfarasIknow

The following is an example of a simple function in AutoHotkey. When a URL is copied to the Clipboard, the hotkey Alt+x will check the URL for any/all parentheses and replace them with alternate characters before pasting the URL from the Clipboard:

In this example, once the contents of a user name or IP Address link have been copied from anywhere on Wikipedia's site to the Clipboard (using Firefox), the following script allows a user to perform the function CopyUser on the Clipboard's contents and save it to a variable designated by either the hotkey Ctrl+⇧ Shift+W or the hotkey Ctrl+⇧ Shift+E. The hotkey Ctrl+⇧ Shift+R utilizes the resultant variables to produce a revert edits summary.

Because AutoHotkey contains many powerful automation tools, it is sometimes used to create malicious software. Given the nature of interpreted languages, this results in a large chunk of the AutoHotkey interpreter (which is not itself malicious[citation needed]) being distributed along with the malicious software. When antivirus vendors try to add the signature of the malware to their databases they often accidentally add the signature of the AutoHotkey interpreter instead[citation needed], resulting in a false positive.[35][36][37][38][39][40][41]