AutoHotkey: Difference between revisions
PeterNLewis (talk | contribs) m added Keyboard Maestro |
Undid revision 1254333213 by Thiagovscoelho (talk) |
||
(285 intermediate revisions by more than 100 users not shown) | |||
Line 1: | Line 1: | ||
{{Short description|Automation-focused scripting language for Windows}} |
|||
{{Citation style|date=August 2012|details=Violates Wikipedia:External links: "Wikipedia articles may include links to web pages outside Wikipedia (external links), but they should not normally be used in the body of an article."}} |
|||
{{for|the use of AutoHotkey by Wikipedia editors|:Wikipedia:AutoHotkey|selfref=y}} |
|||
{{Infobox software |
{{Infobox software |
||
| name = AutoHotkey |
| name = AutoHotkey |
||
| logo = |
| logo = Modern AutoHotkey Logo (no text).svg |
||
| screenshot = |
| screenshot = |
||
| caption = |
| caption = |
||
| developer = Chris Mallett, Steve Gray |
| 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 = 1.1.15.02 |
|||
| latest_release_version = {{wikidata|property|preferred|references|edit|P348|P548=Q2804309}} |
|||
| latest_release_date = {{release date and age|2014|07|07|df=yes}}<ref>{{cite web|url=http://ahkscript.org/download/|title=AutoHotkey Downloads}}</ref> |
|||
| latest_release_date = {{Start date and age|{{wikidata|qualifier|preferred|single|P348|P548=Q2804309|P577}}}} |
|||
| latest preview version = 2.0-a049 |
|||
| latest preview date = {{Start date and age|2014|07|28}} |
|||
| operating_system = [[Microsoft Windows]] |
| operating_system = [[Microsoft Windows]] |
||
| genre = [[Scripting language]] [[Automation]] [[Graphical user interface|GUI]] [[Utility software|utility]] |
| 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> |
|||
| license = [[GNU General Public License|GPL]] |
|||
| website = {{URL |
| website = {{official URL}} |
||
}} |
}} |
||
'''AutoHotkey''' is a [[ |
'''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== |
==Features== |
||
AutoHotkey scripts can be used to launch [[Computer program|programs]], open documents, |
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 |
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: |
|||
Common AutoHotkey tasks: |
|||
*Remapping the keyboard, such as from [[QWERTY]] to [[Dvorak Simplified Keyboard|Dvorak]] |
* Remapping the keyboard, such as from [[QWERTY]] to [[Dvorak Simplified Keyboard|Dvorak]] and other alternative [[Keyboard layout|keyboard layouts]] |
||
*Using shortcuts to |
* 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]] ('''“'''…'''”''') |
|||
*Controlling the mouse cursor with a keyboard or [[joystick]]. |
|||
* Typing other non-keyboard characters, such as the sign {{char|×}} used for dimensional measurement (e.g. 10′×12′) |
|||
*Opening programs, documents, and websites with simple keystrokes. |
|||
* Controlling the mouse cursor with a keyboard or [[joystick]] |
|||
*Adding a [[signature]] to [[e-mail]], [[Internet forum|message boards]], etc. |
|||
* Opening programs, documents, and websites with simple keystrokes |
|||
*Monitoring a system and automatically closing unwanted programs. |
|||
* Adding a [[signature block|signature]] to [[e-mail]], [[Internet forum|message boards]], etc. |
|||
*Scheduling an automatic [[Reminder software|reminder]], system scan, or [[backup]]. |
|||
* Monitoring a system and automatically closing unwanted programs |
|||
*Automating repetitive tasks in [[online games]] (often in violation of said games' terms of service) |
|||
* Scheduling an automatic [[Reminder software|reminder]], system scan or [[backup]] |
|||
*Filling out contest and freebie forms automatically (i.e., it can type in your name, address, etc. automatically) |
|||
* Automating repetitive tasks |
|||
*Quick code testing before implementing in another (more time consuming) programming language. |
|||
* Filling out forms automatically |
|||
*AutoHotkey has even been used by doctors in the radiology world.<ref>[http://www.siimweb.org/index.cfm?id=5522 Tarik K. Alkasab. "Tools to Simplify Follow-up of Patient Outcomes."] ''[[Society for Imaging Informatics in Medicine|SIIM]] News'', Fall 2008 issue.</ref> |
|||
* [[Software prototyping|Prototyping]] applications before implementing them in other, more time-consuming programming languages |
|||
==History== |
==History== |
||
The first public [[beta version|beta]] of AutoHotkey was released on November 10, 2003<ref |
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, |
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== |
==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. |
|||
This script swaps control and alt keys. |
|||
< |
<syntaxhighlight lang="autohotkey"> |
||
#g::Run "https://www.google.com/search?q=" . A_Clipboard |
|||
LCtrl::Alt |
|||
</syntaxhighlight> |
|||
LAlt::Ctrl |
|||
</source> |
|||
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": |
|||
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 {{key press|Win|g}} will open the user's default [[web browser]] and perform the search. |
|||
< |
<syntaxhighlight lang="autohotkey"> |
||
#g:: ; Win+g |
|||
Run http://www.google.com/search?q=%clipboard% |
|||
Return |
|||
</source> |
|||
The following is an example of the script required to create the hotstring "afaik," which is automatically replaced by "as far as I know": |
|||
<source lang="autohotkey"> |
|||
::afaik::as far as I know |
::afaik::as far as I know |
||
</syntaxhighlight> |
|||
</source> |
|||
The following is an example of a simple function in AutoHotkey. When a URL is copied to the Clipboard, the hotkey {{key press|Alt|x}} will check the URL for any/all parentheses and replace them with alternate characters before pasting the URL from the Clipboard: |
|||
<source lang="autohotkey"> |
|||
!x:: ; Alt+x |
|||
URLReplace() |
|||
Send ^v ; Ctrl+v |
|||
Return |
|||
URLReplace() { |
|||
StringReplace, Clipboard, Clipboard, (, `%28, All |
|||
StringReplace, Clipboard, Clipboard, ), `%29, All |
|||
} |
|||
</source> |
|||
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 [[Mozilla Firefox|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 {{key press|Ctrl|Shift|W}} or the hotkey {{key press|Ctrl|Shift|E}}. The hotkey {{key press|Ctrl|Shift|R}} utilizes the resultant variables to produce a revert edits summary. |
|||
== User-contributed features == |
|||
<source lang="autohotkey"> |
|||
^+w::last := CopyUser() ; Ctrl+Shift+w |
|||
^+e::edit := CopyUser() ; Ctrl+Shift+e |
|||
AutoHotKey extensions, interops and inline script libraries are available for use with and from other programming languages, including: |
|||
CopyUser() { |
|||
Clipboard = |
|||
StringReplace, Clipboard, Clipboard, http://en.wikipedia.org/ |
|||
StringReplace, Clipboard, Clipboard, wiki/ |
|||
StringReplace, Clipboard, Clipboard, w/index.php?title= |
|||
StringReplace, Clipboard, Clipboard, Special:Contributions&target= |
|||
StringReplace, Clipboard, Clipboard, User: |
|||
StringReplace, Clipboard, Clipboard, &action=edit |
|||
StringReplace, Clipboard, Clipboard, _, %A_Space%, All |
|||
Return, Clipboard |
|||
} |
|||
{{div col}} |
|||
; Ctrl+Shift+r |
|||
^+r::Send revert edits by [[Special:Contributions/%edit%|%edit%]] to last version by %last% |
|||
</source> |
|||
* [[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> |
|||
More examples of what can be done with AutoHotkey can be found in the [http://www.autohotkey.com/forum/viewforum.php?f=2 Scripts and Functions] section of AutoHotkey's online forum. |
|||
* [[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}} |
|||
==Community== |
|||
The online community forum for AutoHotkey has around 27,300 registered users and around 482,000 posts as of January 2012.<ref>{{cite web|url=http://www.autohotkey.com/forum/ |title=AutoHotkey Community Forum Page |publisher=Autohotkey.com |date= |accessdate=2011-12-02}}</ref> |
|||
Other major plugins enable support for: |
|||
The online chat room for AutoHotkey is located on [[Freenode]] [[Internet Relay Chat|IRC]] with an average of 40 connected users as of November 2009.<ref>{{cite web|url=http://www.autohotkey.com/forum/viewtopic.php?t=28311 |title=Getting connected to AutoHotkey's IRC Chat |publisher=Autohotkey.com |date= |accessdate=2011-12-02}}</ref> |
|||
{{div col}} |
|||
The administration of the official site may have changed.<ref>{{cite web|url=http://www.autohotkey.com/forum/viewtopic.php?t=81753 |title=The future of AutoHotkey.com |publisher=Chris |date=2012-01-26 |accessdate=2012-02-01}}</ref> |
|||
* [[Aspect-oriented programming]] |
|||
==User-contributed features== |
|||
** Function hooks<ref>{{Cite web|url=http://autohotkey.com/board/topic/36560-function-hooks/|title=function hooks - Suggestions|website=AutoHotkey Community}}</ref> |
|||
The following extensions/interops/inline script libraries for usage with/from other programming languages are available or in development: |
|||
* [[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> |
|||
*[http://www.autohotkey.com/forum/topic26191.html .NET Framework] – [[Visual Basic .NET|VB]]/[[C Sharp (programming language)|C#]] ([[Net Framework|.NET]]) |
|||
* 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> |
|||
*[http://www.autohotkey.com/forum/topic44204.html LibLua] – [[Lua (programming language)|Lua]] |
|||
* 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> |
|||
*[http://www.autohotkey.com/forum/topic43081.html Lisp on win32] – [[Lisp (programming language)|Lisp]] |
|||
* [[Human interface device|HIDs]]<ref>{{Cite web|url=http://www.autohotkey.net/~Micha/HIDsupport/Autohotkey.html|title=Human Interface Device(HID) Support}}</ref> |
|||
*[http://www.autohotkey.com/forum/topic36225.html Embeddable Common Lisp] – [[Embeddable Common Lisp|ECL]] |
|||
* [[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> |
|||
*[http://www.autohotkey.com/forum/topic21674.html Windows Scripting Host] – [[VBScript]]/[[JScript]] |
|||
* [[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> |
|||
*[http://www.autohotkey.com/forum/topic21172.html Embedded machine code] – [[Machine code]] |
|||
* [[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}} |
|||
Other: |
|||
==Malware== |
|||
*[[Aspect-oriented programming]] |
|||
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}} |
|||
**[http://www.autohotkey.com/forum/viewtopic.php?t=39838 Function Hooks] |
|||
*[http://www.autohotkey.com/forum/viewtopic.php?t=22923 COM Wrappers] – [[Component Object Model|COM]] |
|||
*[http://www.autohotkey.com/board/topic/96895-libcon-autohotkey-library-for-console-support/ Console Interaction (LibCon)] |
|||
*[http://www.autohotkey.com/forum/viewtopic.php?t=26300 Dynamic Code Generation] |
|||
*[http://www.autohotkey.net/~Micha/HIDsupport/Autohotkey.html Human Interface Device(HID) Support] – [[Human interface device|HID]] |
|||
*[http://www.autohotkey.com/forum/viewtopic.php?p=197475#197475 Internet Explorer Automation] |
|||
*[http://www.autohotkey.com/forum/viewtopic.php?t=775 SmartGUI Creator] |
|||
*[http://www.autohotkey.com/forum/viewtopic.php?t=36047 Sparrow AHK Web Server] |
|||
*[[Synthetic programming]] |
|||
**[http://www.autohotkey.com/forum/viewtopic.php?t=21172 Bit Wizardry] |
|||
*[http://www.autohotkey.com/forum/viewtopic.php?t=35659 Windows Event Hooks] |
|||
==See also== |
==See also== |
||
{{Portal|Free software}} |
{{Portal|Free and open-source software}} |
||
*[[AutoIt]] |
* [[AutoIt]] (for Windows) |
||
* [[AutoKey]] (for Linux) |
|||
*[[KiXtart]] |
|||
* [[Automator (software)|Automator]] (for [[Macintosh]]) |
|||
*[[Winbatch]] |
|||
* [[Bookmarklet]] (for web browsers) |
|||
*[[Macro Express]] |
|||
*[[ |
* [[iMacros]] (for Firefox, Chrome, and Internet Explorer) |
||
*[[ |
* [[Keyboard Maestro]] (for Macintosh) |
||
* [[KiXtart]] (for Windows) |
|||
*[[Bookmarklet]] |
|||
* [[Macro Express]] (for Windows) |
|||
*[[iMacros|iMacros for Firefox]] |
|||
*[[ |
* [[Winbatch]] (for Windows) |
||
==References== |
==References== |
||
Line 151: | Line 113: | ||
==External links== |
==External links== |
||
* {{Official website |
* {{Official website}} |
||
* [https://www.autohotkey.com/foundation/ AutoHotkey Foundation LLC] |
|||
* [https://the-Automator.com The Automator Community and Resources] |
|||
{{DEFAULTSORT:Autohotkey}} |
{{DEFAULTSORT:Autohotkey}} |
||
Line 158: | Line 122: | ||
[[Category:Free software programmed in C++]] |
[[Category:Free software programmed in C++]] |
||
[[Category:Windows-only free software]] |
[[Category:Windows-only free software]] |
||
[[Category:Software using the GPL license]] |
Latest revision as of 14:05, 30 October 2024
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.18[4]
/ 6 July 2024 |
Repository | |
Operating system | Microsoft Windows |
Type | Scripting language Automation GUI utility |
License | GPLv2[5] |
Website | www |
AutoHotkey is a free and open-source custom scripting language for Microsoft Windows, primarily designed to provide easy keyboard shortcuts or hotkeys, fast 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).[6] The installation package includes an extensive help file; web-based documentation is also available.[7]
Features
[edit]AutoHotkey scripts can be used to launch programs, open documents, and emulate keystrokes or mouse clicks and movements.[8] They can also assign, retrieve, and manipulate variables, run loops, and manipulate windows, files, and folders. They can be triggered by a hotkey, such as a script that opens an internet browser when the user presses Ctrl+Alt+I on the keyboard. Keyboard keys can also be remapped and disabled—for example, so that pressing Ctrl+M produces an em dash in the active 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 the system registry, or using the Windows API by calling functions from DLLs. The scripts can be compiled into standalone executable 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.[12]
Some uses for AutoHotkey:
- Remapping the keyboard, such as from QWERTY to Dvorak and other alternative keyboard layouts
- 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′)
- Controlling the mouse cursor with a keyboard or joystick
- Opening programs, documents, and websites with simple keystrokes
- Adding a signature to e-mail, message boards, etc.
- Monitoring a system and automatically closing unwanted programs
- Scheduling an automatic reminder, system scan or backup
- Automating repetitive tasks
- Filling out forms automatically
- Prototyping applications before implementing them in other, more time-consuming programming languages
History
[edit]The first public beta of AutoHotkey was released on November 10, 2003, [1] after author Chris Mallett's proposal to integrate hotkey support into AutoIt v2 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 from GPL to closed source because 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
[edit]In 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
[edit]The following script searches for a particular word or phrase using Google. After the user copies text from any application to the clipboard, pressing the configurable hotkey ⊞ Win+G opens the user's default web browser 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
[edit]AutoHotKey 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]
- COM wrappers[36]
- Console interaction[37]
- Dynamic code generation[38]
- HIDs[39]
- Internet Explorer automation[40]
- GUI creation[41]
- Synthetic programming[33]
- Web services[42]
- Windows event hooks[43]
Malware
[edit]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.[44] When 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]
See also
[edit]- AutoIt (for Windows)
- AutoKey (for Linux)
- 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
[edit]- ^ a b "AutoHotkey Changelog for Years 2003-2004". Autohotkey.com. Archived from the original on 2011-11-04. Retrieved 2011-12-02.
- ^ "Changes & New Features | AutoHotkey". www.autohotkey.com.
- ^ "Lexikos/AutoHotkey_L". GitHub.
- ^ "Release 2.0.18". 6 July 2024. Retrieved 6 July 2024.
- ^ "Software License". AutoHotkey. Retrieved 2022-06-08.
GNU GENERAL PUBLIC LICENSE Version 2, June 1991
- ^ Contact Erica Sadun: Comment (2005-08-19). "Ericasadun 2005 Life Hacker". Lifehacker.com. Retrieved 2011-12-02.
- ^ "Quick Reference | AutoHotkey". www.autohotkey.com.
- ^ "AutoHotkey Tutorial: Macro and Hotkey Creation". Autohotkey.com. Retrieved 2011-12-02.
- ^ "Remapping Keys and Buttons". Autohotkey.com. Retrieved 2011-12-02.
- ^ "Hotstrings and Auto-replace (similar to AutoText and AutoCorrect)". Autohotkey.com. 2005-01-09. Retrieved 2011-12-02.
- ^ "Hotkeys, Hotstrings, and Remapping". Autohotkey.com. Retrieved 2018-05-23.
- ^ "AutoHotkey Changes and New Features, v1.0.47 - June 19, 2007". Autohotkey.com. Retrieved 2011-12-02.
- ^ "Author Chris Mallett's post on the AutoHotkey Forums". Autohotkey.com. Retrieved 2011-12-02.
- ^ "An AutoIt / AutoHotkey nonfunctional comparison". Paperlined.org. Archived from the original on 2011-12-08. Retrieved 2011-12-02.
- ^ "Author Chris Mallett's post on the AutoHotkey Forums". Autohotkey.com. Retrieved 2011-12-02.
- ^ "Licensing Opinions - AutoIt Forums". Autoitscript.com. Retrieved 2011-12-02.
- ^ "Forum post by Chris, announcing AutoHotkey_L now main platform". Autohotkey.com. Retrieved 2011-12-02.
- ^ "Our History". The AutoHotkey Foundation. 2014-05-26. Retrieved 2016-07-23.
- ^ "AutoHotekey.dll Module". github.io. Retrieved 2017-05-13.
- ^ "Hotkeyit's AutoHotkey_H fork". GitHub.
- ^ "Thqby's AutoHotkey_H fork". GitHub.
- ^ "AutoHotkey_H subforum". AutoHotkey.com.
- ^ "AutoHotkey v2". AutoHotkey.com. Retrieved 2021-07-28.
- ^ "AutoHotkey v2.0-beta.1 - AutoHotkey Community". www.autohotkey.com. Retrieved 2022-01-11.
- ^ "AutoHotkey v2.0-rc.1". AutoHotkey.com. Retrieved 2022-11-20.
- ^ "AutoHotkey v2.0.0". AutoHotkey.com. Retrieved 2022-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.
- ^ a b "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". Retrieved 2018-03-29.