AutoHotkeyis afree and open-sourcecustomscripting languageforMicrosoft Windows,primarily designed to provide easykeyboard shortcutsor hotkeys, fastmacro-creation andsoftwareautomationto 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 Windowscontrol keycommands with theirEmacsequivalents).[6]The installation package includes an extensive help file; web-based documentation is also available.[7]
![]() | |
Developer(s) | Chris Mallett, Steve Gray |
---|---|
Initial release | November 10, 2003[1] July 18, 2008 (Steve Gray)[2][3] | (Chris Mallet)
Stable release | 2.0.19[4] ![]() |
Repository | |
Operating system | Microsoft Windows |
Type | Scripting languageAutomationGUIutility |
License | GPLv2[5] |
Website | www |
Features
editAutoHotkey scripts can be used to launchprograms,open documents, and emulatekeystrokesormouseclicks and movements.[8]They can also assign, retrieve, and manipulatevariables,runloops,and manipulatewindows,files,andfolders.They can be triggered by ahotkey,such as a script that opens aninternetbrowserwhen theuserpressesCtrl+Alt+Ion the keyboard. Keyboard keys can also be remapped and disabled—for example, so that pressingCtrl+Mproduces anem dashin theactive window.[9]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".[10]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.[11]
More complex tasks can be achieved with custom data entry forms (GUI windows), working with thesystem registry,or using the WindowsAPIby calling functions fromDLLs.The scripts can becompiledinto standaloneexecutablefiles that can be run on other computers without AutoHotkey installed. TheC++source code can be compiled withVisual Studio Express.
AutoHotkey allows memory access through pointers, as inC.[12]
Some uses for AutoHotkey:
- Remapping the keyboard, such as fromQWERTYtoDvorakand other alternativekeyboard layouts
- Using shortcuts to type frequently-used filenames and other phrases
- Typing punctuation not available on the keyboard, such ascurved quotes(“…”)
- Typing other non-keyboard characters, such as the sign×used for dimensional measurement (e.g. 10′×12′)
- Controlling the mouse cursor with a keyboard orjoystick
- Opening programs, documents, and websites with simple keystrokes
- Adding asignaturetoe-mail,message boards,etc.
- Monitoring a system and automatically closing unwanted programs
- Scheduling an automaticreminder,system scan orbackup
- Automating repetitive tasks
- Filling out forms automatically
- Prototypingapplications before implementing them in other, more time-consuming programming languages
History
editThe first publicbetaof AutoHotkey was released on November 10, 2003,[1]after author Chris Mallett's proposal to integratehotkeysupport intoAutoItv2 failed to generate response from the AutoIt community.[13][14]Mallett built a new program from scratch basing the syntax on AutoIt v2 and using AutoIt v3 for some commands and the compiler.[15]Later, AutoIt v3 switched fromGPLtoclosed sourcebecause of "other projects repeatedly taking AutoIt code" and "setting themselves up as competitors".[16]
In 2010, AutoHotkey v1.1 (originally called AutoHotkey_L) became the platform for ongoing development of AutoHotkey.[17]In late 2012, it became the official branch.[18]Another port of the program is AutoHotkey.dll.[19]A well known fork of the program is AutoHotkey_H,[20][21]which has its own subforum on the main site.[22]
Version 2
editIn July 2021, the first AutoHotkey v2 beta was released.[23][24]The first release candidate was released on November 20, 2022, with the full release of v2.0.0 planned later in the year.[25] On December 20, 2022, version 2.0.0 was officially released.[26]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.[27]On March 16, 2024, the final update of AutoHotkey v1.1 was released. AutoHotkey v1.1 has now reached its end of life.[28]
Examples
editThe following script searches for a particular word or phrase usingGoogle.After the user copies text from any application to theclipboard,pressing the configurable hotkey⊞ Win+Gopens the user's defaultweb browserand performs the search.
#g::Run"https://www.google.com/search?q=".A_Clipboard
The following script defines a hotstring that enables the user to typeafaikin any program and, when followed by an ending character, automatically replace it with "as far as I know":
::afaik::asfarasIknow
User-contributed features
editAutoHotKey extensions, interops and inline script libraries are available for use with and from other programming languages, including:
Other major plugins enable support for:
- Aspect-oriented programming
- Function hooks[35]
- COMwrappers[36]
- Console interaction[37]
- Dynamic code generation[38]
- HIDs[39]
- Internet Explorerautomation[40]
- GUIcreation[41]
- Synthetic programming[33]
- Web services[42]
- Windows event hooks[43]
Malware
editWhen 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 aninterpreted language.Inevitably, somemalwarehas been written using AutoHotkey.[44]Whenanti-malwareproducts 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.[citation needed]
See also
edit- AutoIt(for Windows)
- AutoKey(for Linux)
- Automator(forMacintosh)
- Bookmarklet(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
edit- ^ab"AutoHotkey Changelog for Years 2003-2004".Autohotkey.com. Archived fromthe originalon 2011-11-04.Retrieved2011-12-02.
- ^"Changes & New Features | AutoHotkey".www.autohotkey.com.
- ^"Lexikos/AutoHotkey_L".GitHub.
- ^"Release 2.0.19".25 January 2025.Retrieved28 January2025.
- ^"Software License".AutoHotkey.Retrieved2022-06-08.
GNU GENERAL PUBLIC LICENSE Version 2, June 1991
- ^Contact Erica Sadun: Comment (2005-08-19)."Ericasadun 2005 Life Hacker".Lifehacker.com.Retrieved2011-12-02.
- ^"Quick Reference | AutoHotkey".www.autohotkey.com.
- ^"AutoHotkey Tutorial: Macro and Hotkey Creation".Autohotkey.com.Retrieved2011-12-02.
- ^"Remapping Keys and Buttons".Autohotkey.com.Retrieved2011-12-02.
- ^"Hotstrings and Auto-replace (similar to AutoText and AutoCorrect)".Autohotkey.com. 2005-01-09.Retrieved2011-12-02.
- ^"Hotkeys, Hotstrings, and Remapping".Autohotkey.com.Retrieved2018-05-23.
- ^"AutoHotkey Changes and New Features, v1.0.47 - June 19, 2007".Autohotkey.com.Retrieved2011-12-02.
- ^"Author Chris Mallett's post on the AutoHotkey Forums".Autohotkey.com.Retrieved2011-12-02.
- ^"An AutoIt / AutoHotkey nonfunctional comparison".Paperlined.org. Archived fromthe originalon 2011-12-08.Retrieved2011-12-02.
- ^"Author Chris Mallett's post on the AutoHotkey Forums".Autohotkey.com.Retrieved2011-12-02.
- ^"Licensing Opinions - AutoIt Forums".Autoitscript.com.Retrieved2011-12-02.
- ^"Forum post by Chris, announcing AutoHotkey_L now main platform".Autohotkey.com.Retrieved2011-12-02.
- ^"Our History".The AutoHotkey Foundation. 2014-05-26.Retrieved2016-07-23.
- ^"AutoHotekey.dll Module".github.io.Retrieved2017-05-13.
- ^"Hotkeyit's AutoHotkey_H fork".GitHub.
- ^"Thqby's AutoHotkey_H fork".GitHub.
- ^"AutoHotkey_H subforum".AutoHotkey.com.
- ^"AutoHotkey v2".AutoHotkey.com.Retrieved2021-07-28.
- ^"AutoHotkey v2.0-beta.1 - AutoHotkey Community".www.autohotkey.com.Retrieved2022-01-11.
- ^"AutoHotkey v2.0-rc.1".AutoHotkey.com.Retrieved2022-11-20.
- ^"AutoHotkey v2.0.0".AutoHotkey.com.Retrieved2022-12-20.
- ^"AutoHotkey v2 Official Release Announcement".AutoHotkey.com.
- ^"End of Life: v1.1".AutoHotkey.com.
- ^".NET Framework Interop - Scripts and Functions".AutoHotkey Community.
- ^"AHK + LUA Interop (stdlib), proof of concept - Scripts and Functions".AutoHotkey Community.
- ^"ahklisp: lisp on win32 with cffi, sbcl, and autohotkey - Scripts and Functions".AutoHotkey Community.
- ^"ahkecl: Embedded common lisp in ahk - Scripts and Functions".AutoHotkey Community.
- ^ab"Machine code functions: Bit Wizardry - Scripts and Functions".AutoHotkey Community.
- ^"Embedded Windows Scripting (VBScript & JScript) and COM - Scripts and Functions".AutoHotkey Community.
- ^"function hooks - Suggestions".AutoHotkey Community.
- ^"COM Standard Library - Scripts and Functions".AutoHotkey Community.
- ^"LibCon - AutoHotkey Library For Console Support - Scripts and Functions".AutoHotkey Community.
- ^"LowLevel & dynamic code - Scripts and Functions".AutoHotkey Community.
- ^"Human Interface Device(HID) Support".
- ^"Automation IE7 Navigation and Scripting with Tabs - Scripts and Functions".AutoHotkey Community.
- ^":: SmartGUI Creator:: - Scripts and Functions".AutoHotkey Community.
- ^"Sparrow: AHK WebServer w/ AHK in HTML support (sources incl) - Scripts and Functions".AutoHotkey Community.
- ^"[tool] WinEventHook Messages - Scripts and Functions".AutoHotkey Community.
- ^Research, Cybereason Nocturnus."Fauxpersky: CredStealer malware written in AutoHotKey masquerades as Kaspersky Antivirus, spreading through infecting USB drives".Retrieved2018-03-29.