AutoHotkey is a
free and open-source
Free and open-source software (FOSS) is software available under a Software license, license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term ...
custom
scripting language
In computing, a script is a relatively short and simple set of instructions that typically automation, automate an otherwise manual process. The act of writing a script is called scripting. A scripting language or script language is a programming ...
for
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, primarily designed to provide easy
keyboard shortcut
In computing, a keyboard shortcut (also hotkey/hot key or key binding) is a software-based assignment of an action to one or more keys on a computer keyboard. Most Operating system, operating systems and Application software, applications come ...
s or hotkeys, fast
macro-creation and
software
Software consists of computer programs that instruct the Execution (computing), execution of a computer. Software also includes design documents and specifications.
The history of software is closely tied to the development of digital comput ...
automation
Automation describes a wide range of technologies that reduce human intervention in processes, mainly by predetermining decision criteria, subprocess relationships, and related actions, as well as embodying those predeterminations in machine ...
to allow users of most computer skill levels to automate repetitive tasks in any Windows application. It can easily extend or modify user interfaces (for example, overriding the default Windows
control key
In computing, a Control key is a modifier key which, when pressed in conjunction with another key, performs a special operation (for example, ). Similarly to the Shift key, the Control key rarely performs any function when pressed by itself. ...
commands with their
Emacs
Emacs (), originally named EMACS (an acronym for "Editor Macros"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, s ...
equivalents). The installation package includes an extensive help file; web-based documentation is also available.
Features
AutoHotkey scripts can be used to launch
programs, open documents, and emulate
keystrokes or
mouse
A mouse (: mice) is a small rodent. Characteristically, mice are known to have a pointed snout, small rounded ears, a body-length scaly tail, and a high breeding rate. The best known mouse species is the common house mouse (''Mus musculus'' ...
clicks and movements. They can also assign, retrieve, and manipulate
variables, run
loops, and manipulate
windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
,
files, and
folders. They can be triggered by a
hotkey
In computing, a keyboard shortcut (also hotkey/hot key or key binding) is a software-based assignment of an action to one or more keys on a computer keyboard. Most operating systems and applications come with a default set of keyboard shortcu ...
, such as a script that opens an
internet
The Internet (or internet) is the Global network, global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a internetworking, network of networks ...
browser when the
user
Ancient Egyptian roles
* User (ancient Egyptian official), an ancient Egyptian nomarch (governor) of the Eighth Dynasty
* Useramen, an ancient Egyptian vizier also called "User"
Other uses
* User (computing), a person (or software) using an ...
presses on the keyboard. Keyboard keys can also be remapped and disabled—for example, so that pressing produces an
em dash
The dash is a punctuation mark consisting of a long horizontal line. It is similar in appearance to the hyphen but is longer and sometimes higher from the baseline. The most common versions are the endash , generally longer than the hyphen ...
in the
active window. AutoHotkey also allows "hotstrings" that automatically replace certain text as it is typed, such as assigning the string "btw" to produce the text "by the way", or the text "%o" to produce "percentage of". Scripts can also be set to run automatically at computer startup, with no keyboard action required—for example, for performing file management at a set interval.
More complex tasks can be achieved with custom data entry forms (
GUI windows), working with the
system registry, or using the Windows
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
by calling functions from
DLLs. The scripts can be
compiled into standalone
executable
In computer science, executable code, an executable file, or an executable program, sometimes simply referred to as an executable or binary, causes a computer "to perform indicated tasks according to encoded instruction (computer science), in ...
files that can be run on other computers without AutoHotkey installed. The
C++ source code can be compiled with
Visual Studio Express.
AutoHotkey allows memory access through pointers, as in
C.
Some uses for AutoHotkey:
* Remapping the keyboard, such as from
QWERTY
QWERTY ( ) is a keyboard layout for Latin-script alphabets. The name comes from the order of the first six Computer keyboard keys#Types, keys on the top letter row of the keyboard: . The QWERTY design is based on a layout included in the Sh ...
to
Dvorak and other alternative
keyboard layout
A keyboard layout is any specific physical, visual, or functional arrangement of the keys, legends, or key-meaning associations (respectively) of a computer keyboard, mobile phone, or other computer-controlled typographic keyboard. Standard keybo ...
s
* Using shortcuts to type frequently-used filenames and other phrases
* Typing punctuation not available on the keyboard, such as
curved quotes (“…”)
* Typing other non-keyboard characters, such as the sign used for dimensional measurement (e.g. 10′×12′)
* Simulating mouse cursor input via a script or keystrokes
* Opening programs, documents, and websites with simple keystrokes
* Pasting text strings on command (e.g. adding
signatures to
e-mails,
message boards posts, etc.)
* Monitoring a system and automatically closing unwanted programs
* Scheduling an automatic
reminder, system scan, or
backup
In information technology, a backup, or data backup is a copy of computer data taken and stored elsewhere so that it may be used to restore the original after a data loss event. The verb form, referring to the process of doing so, is "wikt:back ...
* Filling out forms automatically
*
Prototyping
A prototype is an early sample, model, or release of a product built to test a concept or process. It is a term used in a variety of contexts, including semantics, design, electronics, and software programming. A prototype is generally used to ...
applications before implementing them in other, more time-consuming programming languages
History
The first public
beta
Beta (, ; uppercase , lowercase , or cursive ; or ) is the second letter of the Greek alphabet. In the system of Greek numerals, it has a value of 2. In Ancient Greek, beta represented the voiced bilabial plosive . In Modern Greek, it represe ...
of AutoHotkey was released on November 10, 2003,
after author Chris Mallett's proposal to integrate
hotkey
In computing, a keyboard shortcut (also hotkey/hot key or key binding) is a software-based assignment of an action to one or more keys on a computer keyboard. Most operating systems and applications come with a default set of keyboard shortcu ...
support into
AutoIt v2 failed to generate response from the AutoIt community. Mallett built a new program from scratch basing the syntax on AutoIt v2 and using AutoIt v3 for some commands and the compiler. Later, AutoIt v3 switched from
GPL to
closed source
Proprietary software is software that grants its creator, publisher, or other rightsholder or rightsholder partner a legal monopoly by modern copyright and intellectual property law to exclude the recipient from freely sharing the software or modi ...
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 platform for ongoing development of AutoHotkey. In late 2012, it became the official branch.
Another port of the program is AutoHotkey.dll. A well known fork of the program is AutoHotkey_H, which has its own subforum on the main site.
Version 2
In July 2021, the first AutoHotkey v2 beta was released. The first release candidate was released on November 20, 2022, with the full release of v2.0.0 planned later in the year.
On December 20, 2022, version 2.0.0 was officially released. On January 22, 2023, AutoHotkey v2 became the official primary version. AutoHotkey v1.1 became legacy and no new features were implemented, but this version was still supported by the site. On March 16, 2024, the final update of AutoHotkey v1.1 was released. AutoHotkey v1.1 has now reached its end of life.
Examples
The following script searches for a particular word or phrase using
Google
Google LLC (, ) is an American multinational corporation and technology company focusing on online advertising, search engine technology, cloud computing, computer software, quantum computing, e-commerce, consumer electronics, and artificial ...
. After the user copies text from any application to the
clipboard, pressing the configurable hotkey opens the user's default
web browser
A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
and performs the search.
#g::Run "https://www.google.com/search?q=" . A_Clipboard
The following script defines a hotstring that enables the user to type ''afaik'' in any program and, when followed by an ending character, automatically replace it with "as far as I know":
::afaik::as far as I know
User-contributed features
AutoHotKey extensions, interops and inline script libraries are available for use with and from other programming languages, including:
*
VB/
C# (
.NET
The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
)
*
Lua
*
Lisp
Lisp (historically LISP, an abbreviation of "list processing") is a family of programming languages with a long history and a distinctive, fully parenthesized Polish notation#Explanation, prefix notation.
Originally specified in the late 1950s, ...
*
ECL
* Embedded
machine code
In computer programming, machine code is computer code consisting of machine language instructions, which are used to control a computer's central processing unit (CPU). For conventional binary computers, machine code is the binaryOn nonb ...
*
VBScript
VBScript (Microsoft Visual Basic Scripting Edition) is a deprecated programming language for scripting on Microsoft Windows using Component Object Model (COM), based on classic Visual Basic and Active Scripting. It was popular with system admi ...
/
JScript
JScript is Microsoft's legacy dialect of the ECMAScript standard that is used in Microsoft's Internet Explorer web browser and HTML Applications, and as a standalone Windows scripting language.
JScript is implemented as an Active Scripting eng ...
(
Windows Scripting Host
The Microsoft Windows Script Host (WSH) (formerly named Windows Scripting Host) is an automation technology for Microsoft Windows operating systems that provides scripting abilities comparable to batch files, but with a wider range of supported fe ...
)
Other major plugins enable support for:
*
Aspect-oriented programming
In computing, aspect-oriented programming (AOP) is a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns. It does so by adding behavior to existing code (an advice) ''without'' modifying t ...
** Function hooks
*
COM wrappers
* Console interaction
* Dynamic code generation
*
HIDs
*
Internet Explorer
Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated as IE or MSIE) is a deprecation, retired series of graphical user interface, graphical web browsers developed by Microsoft that were u ...
automation
*
GUI creation
*
Synthetic programming
*
Web service
A web service (WS) is either:
* a service offered by an electronic device to another electronic device, communicating with each other via the Internet, or
* a server running on a computer device, listening for requests at a particular port over a n ...
s
* Windows event hooks
Malware
When AutoHotkey is used to make standalone software for distribution, that software must include the part of AutoHotkey itself that understands and executes AutoHotkey scripts, as it is an
interpreted language
In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program. An inter ...
. Inevitably, some
malware
Malware (a portmanteau of ''malicious software'')Tahir, R. (2018)A study on malware and malware detection techniques . ''International Journal of Education and Management Engineering'', ''8''(2), 20. is any software intentionally designed to caus ...
has been written using AutoHotkey.
When
anti-malware
Antivirus software (abbreviated to AV software), also known as anti-malware, is a computer program used to prevent, detect, and remove malware.
Antivirus software was originally developed to detect and remove computer viruses, hence the name ...
products attempt to earmark items of malware that have been programmed using AutoHotkey, they sometimes falsely identify AutoHotkey as the culprit rather than the actual malware.
See also
*
AutoIt (for Windows)
*
AutoKey (for Linux)
*
Automator (for
Macintosh
Mac is a brand of personal computers designed and marketed by Apple Inc., Apple since 1984. The name is short for Macintosh (its official name until 1999), a reference to the McIntosh (apple), McIntosh apple. The current product lineup inclu ...
)
*
Bookmarklet
A bookmarklet is a bookmark stored in a web browser that contains JavaScript commands that add new features to the browser. They are stored as the URL of a bookmark in a web browser or as a hyperlink on a web page. Bookmarklets are usually small ...
(for web browsers)
*
iMacros (for Firefox, Chrome, and Internet Explorer)
*
Keyboard Maestro (for Macintosh)
*
KiXtart (for Windows)
*
Macro Express (for Windows)
*
Winbatch (for Windows)
References
External links
*
AutoHotkey Foundation LLCThe Automator Community and Resources
{{DEFAULTSORT:Autohotkey
Automation software
Free system software
Free software programmed in C++
Windows-only free software
Software using the GNU General Public License