Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
AutoHotkey
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Automation-focused scripting language for Windows}} {{for|the use of AutoHotkey by Wikipedia editors|:Wikipedia:AutoHotkey|selfref=y}} {{Infobox software | name = AutoHotkey | logo = Modern AutoHotkey Logo (no text).svg | screenshot = | caption = | developer = Chris Mallett, Steve Gray | released = {{Start date and age|2003|11|10}} (Chris Mallet)<ref name="2003to2004changelog">{{cite web|url=http://www.autohotkey.com/changelog/2004.htm |title=AutoHotkey Changelog for Years 2003-2004 |publisher=Autohotkey.com |access-date=2011-12-02 |url-status=dead |archive-url=https://web.archive.org/web/20111104142142/http://www.autohotkey.com/changelog/2004.htm |archive-date=2011-11-04 }}</ref><br/>{{Start date and age|2008|7|18}} (Steve Gray)<ref>{{Cite web|url=https://www.autohotkey.com/docs/AHKL_ChangeLog.htm#L4|title=Changes & New Features | AutoHotkey|website=www.autohotkey.com}}</ref><ref>{{Cite web|url=https://github.com/Lexikos/AutoHotkey_L|title=Lexikos/AutoHotkey_L|website=GitHub}}</ref> | latest_release_version = {{wikidata|property|preferred|references|edit|P348|P548=Q2804309}} | latest_release_date = {{Start date and age|{{wikidata|qualifier|preferred|single|P348|P548=Q2804309|P577}}}} | operating_system = [[Microsoft Windows]] | genre = [[Scripting language]] [[Automation]] [[Graphical user interface|GUI]] [[Utility software|utility]] | license = [[GPLv2]]<ref>{{cite web| url=https://www.autohotkey.com/docs/license.htm| title=Software License| publisher={{PAGENAME}}| accessdate=2022-06-08| quote=GNU GENERAL PUBLIC LICENSE Version 2, June 1991}}</ref> | website = {{official URL}} }} '''AutoHotkey''' is a [[Free and open-source software|free and open-source]] custom [[scripting language]] for [[Windows|Microsoft Windows]], primarily designed to provide easy [[keyboard shortcut]]s or hotkeys, fast [[Macro (computer science)#Keyboard and mouse macros|macro]]-creation and [[software]] [[automation]] 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]] commands with their [[Emacs]] equivalents).<ref>{{cite web|author=Contact Erica Sadun: Comment |url=http://lifehacker.com/software/software/download-of-the-day-autohotkey-118270.php |title=Ericasadun 2005 Life Hacker |publisher=Lifehacker.com |date=2005-08-19 |access-date=2011-12-02}}</ref> The installation package includes an extensive help file; web-based documentation is also available.<ref>{{Cite web|url=https://www.autohotkey.com/docs/AutoHotkey.htm|title=Quick Reference | AutoHotkey|website=www.autohotkey.com}}</ref> ==Features== AutoHotkey scripts can be used to launch [[Computer program|programs]], open documents, and emulate [[keystrokes]] or [[Mouse (computing)|mouse]] clicks and movements.<ref>{{cite web |url=http://www.autohotkey.com/docs/Tutorial.htm |title=AutoHotkey Tutorial: Macro and Hotkey Creation |publisher=Autohotkey.com |access-date=2011-12-02}}</ref> They can also assign, retrieve, and manipulate [[Variable (programming)|variables]], run [[Program loops|loops]], and manipulate [[Window (computing)|windows]], [[Computer file|files]], and [[Directory (file systems)|folders]]. They can be triggered by a [[Keyboard shortcut|hotkey]], such as a script that opens an [[internet]] [[Web browser|browser]] when the [[User (computing)|user]] presses {{key press|Ctrl|Alt|I}} on the keyboard. Keyboard keys can also be remapped and disabled—for example, so that pressing {{key press|Ctrl|M}} produces an [[Dash|em dash]] in the [[active window]].<ref>{{cite web |url=http://www.autohotkey.com/docs/misc/Remap.htm |title=Remapping Keys and Buttons |publisher=Autohotkey.com |access-date=2011-12-02}}</ref> 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".<ref>{{cite web |url=http://www.autohotkey.com/docs/Hotstrings.htm |title=Hotstrings and Auto-replace (similar to AutoText and AutoCorrect) |publisher=Autohotkey.com |date=2005-01-09 |access-date=2011-12-02}}</ref> 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.<ref>{{cite web |url=https://autohotkey.com/docs/FAQ.htm#Startup |title=Hotkeys, Hotstrings, and Remapping |publisher=Autohotkey.com |access-date=2018-05-23}}</ref> More complex tasks can be achieved with custom data entry forms ([[Graphical user interface|GUI windows]]), working with the [[Windows Registry|system registry]], or using the Windows [[Application programming interface|API]] by calling functions from [[Dynamic-link library|DLLs]]. The scripts can be [[Compiler|compiled]] into standalone [[executable]] files that can be run on other computers without AutoHotkey installed. The [[C++]] source code can be compiled with [[Microsoft Visual Studio Express|Visual Studio Express]]. AutoHotkey allows memory access through pointers, as in [[C (programming language)|C]].<ref>{{cite web |url=http://www.autohotkey.com/changelog/ |title=AutoHotkey Changes and New Features, v1.0.47 - June 19, 2007 |publisher=Autohotkey.com |access-date=2011-12-02}}</ref> Some uses for AutoHotkey: * Remapping the keyboard, such as from [[QWERTY]] to [[Dvorak Simplified Keyboard|Dvorak]] and other alternative [[keyboard layout]]s * Using shortcuts to type frequently-used filenames and other phrases * Typing punctuation not available on the keyboard, such as [[Quotation mark#Curved quotes within and across applications|curved quotes]] ('''“'''…'''”''') * Typing other non-keyboard characters, such as the sign {{char|×}} used for dimensional measurement (e.g. 10′×12′) * Controlling the mouse cursor with a keyboard or [[joystick]] * Opening programs, documents, and websites with simple keystrokes * Adding a [[signature block|signature]] to [[e-mail]], [[Internet forum|message boards]], etc. * Monitoring a system and automatically closing unwanted programs * Scheduling an automatic [[Reminder software|reminder]], system scan or [[backup]] * Automating repetitive tasks * Filling out forms automatically * [[Software prototyping|Prototyping]] applications before implementing them in other, more time-consuming programming languages ==History== The first public [[beta version|beta]] of AutoHotkey was released on November 10, 2003,<ref name="2003to2004changelog" /> after author Chris Mallett's proposal to integrate [[hotkey]] support into [[AutoIt]] v2 failed to generate response from the AutoIt community.<ref>{{cite web |url=http://www.autohotkey.com/forum/viewtopic.php?p=20176#20176 |title=Author Chris Mallett's post on the AutoHotkey Forums |publisher=Autohotkey.com |access-date=2011-12-02}}</ref><ref>{{cite web |url=http://paperlined.org/apps/autohotkey/autoit_and_autohotkey.html |title=An AutoIt / AutoHotkey nonfunctional comparison |publisher=Paperlined.org |access-date=2011-12-02 |archive-url=https://web.archive.org/web/20111208181846/http://paperlined.org/apps/autohotkey/autoit_and_autohotkey.html |archive-date=2011-12-08 |url-status=dead }}</ref> Mallett built a new program from scratch basing the syntax on AutoIt v2 and using AutoIt v3 for some commands and the compiler.<ref>{{cite web |url=http://www.autohotkey.com/forum/viewtopic.php?p=19710#19710 |title=Author Chris Mallett's post on the AutoHotkey Forums |publisher=Autohotkey.com |access-date=2011-12-02}}</ref> Later, AutoIt v3 switched from [[GPL]] to [[closed source]] because of "other projects repeatedly taking AutoIt code" and "setting themselves up as competitors".<ref>{{cite web |url=http://www.autoitscript.com/forum/index.php?showtopic=7204 |title=Licensing Opinions - AutoIt Forums |publisher=Autoitscript.com |access-date=2011-12-02}}</ref> In 2010, AutoHotkey v1.1 (originally called AutoHotkey_L) became the platform for ongoing development of AutoHotkey.<ref>{{cite web |url=http://www.autohotkey.com/forum/viewtopic.php?t=63474 |title=Forum post by Chris, announcing AutoHotkey_L now main platform |publisher=Autohotkey.com |access-date=2011-12-02}}</ref> In late 2012, it became the official branch.<ref name="ourhistory">{{cite web |url=http://autohotkey.com/foundation/history.html |title=Our History |publisher=The AutoHotkey Foundation |date=2014-05-26 |access-date=2016-07-23}}</ref> Another port of the program is AutoHotkey.dll.<ref>{{cite web |url=https://hotkeyit.github.io/v2/docs/AutoHotkeyDll.htm |title=AutoHotekey.dll Module |website=github.io |access-date=2017-05-13}}</ref> A well known fork of the program is AutoHotkey_H,<ref>{{cite web |url=https://github.com/HotKeyIt/ahkdll-v1-release |title=Hotkeyit's AutoHotkey_H fork |website=GitHub}}</ref><ref>{{cite web |url=https://github.com/thqby/AutoHotkey_H |title=Thqby's AutoHotkey_H fork |website=GitHub}}</ref> which has its own subforum on the main site.<ref>{{cite web |url=https://www.autohotkey.com/boards/viewforum.php?f=65&sid=0c0df0bbedf6f0f896d40ff67119d7c0 |title=AutoHotkey_H subforum |website=AutoHotkey.com}}</ref> ===Version 2=== In July 2021, the first AutoHotkey v2 beta was released.<ref>{{cite web |url=https://www.autohotkey.com/v2/ |title=AutoHotkey v2|publisher=AutoHotkey.com |access-date=2021-07-28}}</ref><ref>{{Cite web|title=AutoHotkey v2.0-beta.1 - AutoHotkey Community|url=https://www.autohotkey.com/boards/viewtopic.php?f=24&t=93011|access-date=2022-01-11|website=www.autohotkey.com}}</ref> The first release candidate was released on November 20, 2022, with the full release of v2.0.0 planned later in the year.<ref>{{cite web |url=https://www.autohotkey.com/boards/viewtopic.php?f=24&t=110696 |title=AutoHotkey v2.0-rc.1|publisher=AutoHotkey.com |access-date=2022-11-20}}</ref> On December 20, 2022, version 2.0.0 was officially released.<ref>{{cite web |url=https://www.autohotkey.com/boards/viewtopic.php?f=24&t=111779 |title=AutoHotkey v2.0.0|publisher=AutoHotkey.com |access-date=2022-12-20}}</ref> 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.<ref>{{cite web |url=https://www.autohotkey.com/boards/viewtopic.php?f=24&p=503457#p503457 |title=AutoHotkey v2 Official Release Announcement|website=AutoHotkey.com}}</ref> On March 16, 2024, the final update of AutoHotkey v1.1 was released. AutoHotkey v1.1 has now reached its end of life.<ref>{{cite web |url=https://www.autohotkey.com/boards/viewtopic.php?t=127382 |title=End of Life: v1.1|website=AutoHotkey.com}}</ref> ==Examples== The following script searches for a particular word or phrase using [[Google Search|Google]]. After the user copies text from any application to the [[Clipboard (computing)|clipboard]], pressing the configurable hotkey {{key press|Win|G}} opens the user's default [[web browser]] and performs the search. <syntaxhighlight lang="autohotkey"> #g::Run "https://www.google.com/search?q=" . A_Clipboard </syntaxhighlight> 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": <syntaxhighlight lang="autohotkey"> ::afaik::as far as I know </syntaxhighlight> == User-contributed features == AutoHotKey extensions, interops and inline script libraries are available for use with and from other programming languages, including: {{div col}} * [[Visual Basic .NET|VB]]/[[C Sharp (programming language)|C#]] ([[Net Framework|.NET]])<ref>{{Cite web|url=http://autohotkey.com/board/topic/23884-net-framework-interop/|title=.NET Framework Interop - Scripts and Functions|website=AutoHotkey Community}}</ref> * [[Lua (programming language)|Lua]]<ref>{{Cite web|url=http://autohotkey.com/board/topic/40690-ahk-lua-interop-stdlib-proof-of-concept/|title=AHK + LUA Interop (stdlib), proof of concept - Scripts and Functions|website=AutoHotkey Community}}</ref> * [[Lisp (programming language)|Lisp]]<ref>{{Cite web|url=http://autohotkey.com/board/topic/39620-ahklisp-lisp-on-win32-with-cffi-sbcl-and-autohotkey/|title=ahklisp: lisp on win32 with cffi, sbcl, and autohotkey - Scripts and Functions|website=AutoHotkey Community}}</ref> * [[Embeddable Common Lisp|ECL]]<ref>{{Cite web|url=http://autohotkey.com/board/topic/33182-ahkecl-embedded-common-lisp-in-ahk/|title=ahkecl : Embedded common lisp in ahk - Scripts and Functions|website=AutoHotkey Community}}</ref> * Embedded [[machine code]]<ref name="auto">{{Cite web|url=http://autohotkey.com/board/topic/19483-machine-code-functions-bit-wizardry/|title=Machine code functions: Bit Wizardry - Scripts and Functions|website=AutoHotkey Community}}</ref> * [[VBScript]]/[[JScript]] ([[Windows Scripting Host]])<ref>{{Cite web|url=http://autohotkey.com/board/topic/19963-embedded-windows-scripting-vbscript-jscript-and-com/|title=Embedded Windows Scripting (VBScript & JScript) and COM - Scripts and Functions|website=AutoHotkey Community}}</ref> {{div col end}} Other major plugins enable support for: {{div col}} * [[Aspect-oriented programming]] ** Function hooks<ref>{{Cite web|url=http://autohotkey.com/board/topic/36560-function-hooks/|title=function hooks - Suggestions|website=AutoHotkey Community}}</ref> * [[Component Object Model|COM]] wrappers<ref>{{Cite web|url=http://autohotkey.com/board/topic/21142-com-standard-library/|title=COM Standard Library - Scripts and Functions|website=AutoHotkey Community}}</ref> * Console interaction<ref>{{Cite web|url=http://autohotkey.com/board/topic/96895-libcon-autohotkey-library-for-console-support/|title=LibCon - AutoHotkey Library For Console Support - Scripts and Functions|website=AutoHotkey Community}}</ref> * Dynamic code generation<ref>{{Cite web|url=http://autohotkey.com/board/topic/23984-lowlevel-dynamic-code/|title=LowLevel & dynamic code - Scripts and Functions|website=AutoHotkey Community}}</ref> * [[Human interface device|HIDs]]<ref>{{Cite web|url=http://www.autohotkey.net/~Micha/HIDsupport/Autohotkey.html|title=Human Interface Device(HID) Support}}</ref> * [[Internet Explorer]] automation<ref>{{Cite web|url=http://autohotkey.com/board/topic/27950-automation-ie7-navigation-and-scripting-with-tabs/|title=Automation IE7 Navigation and Scripting with Tabs - Scripts and Functions|website=AutoHotkey Community}}</ref> * [[Graphical user interface|GUI]] creation<ref>{{Cite web|url=http://autohotkey.com/board/topic/738-smartgui-creator/|title=:: SmartGUI Creator :: - Scripts and Functions|website=AutoHotkey Community}}</ref> * [[Synthetic programming]]<ref name="auto"/> * [[Web service]]s<ref>{{Cite web|url=http://autohotkey.com/board/topic/33020-sparrow-ahk-webserver-w-ahk-in-html-support-sources-incl/|title=Sparrow: AHK WebServer w/ AHK in HTML support (sources incl) - Scripts and Functions|website=AutoHotkey Community}}</ref> * Windows event hooks<ref>{{Cite web|url=http://autohotkey.com/board/topic/32662-tool-wineventhook-messages/|title=[tool] WinEventHook Messages - Scripts and Functions|website=AutoHotkey Community}}</ref> {{div col end}} ==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]]. Inevitably, some [[malware]] has been written using AutoHotkey.<ref>{{Cite news|url=https://www.cybereason.com/blog/fauxpersky-credstealer-malware-autohotkey-kaspersky-antivirus|title=Fauxpersky: CredStealer malware written in AutoHotKey masquerades as Kaspersky Antivirus, spreading through infecting USB drives|last=Research|first=Cybereason Nocturnus|access-date=2018-03-29}}</ref> When [[Antivirus software|anti-malware]] 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.{{citation needed|date=December 2023}} ==See also== {{Portal|Free and open-source software}} * [[AutoIt]] (for Windows) * [[AutoKey]] (for Linux) * [[Automator (software)|Automator]] (for [[Macintosh]]) * [[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== {{Reflist}} ==External links== * {{Official website}} * [https://www.autohotkey.com/foundation/ AutoHotkey Foundation LLC] * [https://the-Automator.com The Automator Community and Resources] {{DEFAULTSORT:Autohotkey}} [[Category:Automation software]] [[Category:Free system software]] [[Category:Free software programmed in C++]] [[Category:Windows-only free software]] [[Category:Software using the GNU General Public License]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Char
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite news
(
edit
)
Template:Cite web
(
edit
)
Template:Div col
(
edit
)
Template:Div col end
(
edit
)
Template:For
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Key press
(
edit
)
Template:Main other
(
edit
)
Template:Official website
(
edit
)
Template:Portal
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Template other
(
edit
)