AutoHotkey explained

AutoHotkey
Developer:Chris Mallett, Steve Gray
Released: (Chris Mallet)[1]
(Steve Gray)[2] [3]
Operating System:Microsoft Windows
Genre:Scripting language Automation GUI utility
License:GPLv2Web site: Software License. . 2022-06-08. GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

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).[4] The installation package includes an extensive help file; web-based documentation is also available.[5]

Features

AutoHotkey scripts can be used to launch programs, open documents, and emulate keystrokes or mouse clicks and movements.[6] 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 on the keyboard. Keyboard keys can also be remapped and disabled—for example, so that pressing produces an em dash in the active window.[7] 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".[8] 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.[9]

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.[10]

Some uses for AutoHotkey:

History

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

In 2010, AutoHotkey v1.1 (originally called AutoHotkey_L) became the platform for ongoing development of AutoHotkey.[15] In late 2012, it became the official branch.[16] Another port of the program is AutoHotkey.dll.[17] A well known fork of the program is AutoHotkey_H,[18] [19] which has its own subforum on the main site.[20]

Version 2

In July 2021, the first AutoHotkey v2 beta was released.[21] [22] The first release candidate was released on November 20, 2022, with the full release of v2.0.0 planned later in the year.[23] On December 20, 2022, version 2.0.0 was officially released.[24] 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.[25] On March 16, 2024, the final update of AutoHotkey v1.1 was released. AutoHotkey v1.1 has now reached its end of life.[26]

Examples

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 opens the user's default web browser and performs the search.

  1. 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:

Other major plugins enable support for:

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.[42] 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.

See also

External links

Notes and References

  1. Web site: AutoHotkey Changelog for Years 2003-2004 . Autohotkey.com . 2011-12-02 . dead . https://web.archive.org/web/20111104142142/http://www.autohotkey.com/changelog/2004.htm . 2011-11-04 .
  2. Web site: Changes & New Features | AutoHotkey. www.autohotkey.com.
  3. Web site: Lexikos/AutoHotkey_L. GitHub.
  4. Web site: Contact Erica Sadun: Comment . Ericasadun 2005 Life Hacker . Lifehacker.com . 2005-08-19 . 2011-12-02.
  5. Web site: Quick Reference | AutoHotkey. www.autohotkey.com.
  6. Web site: AutoHotkey Tutorial: Macro and Hotkey Creation . Autohotkey.com . 2011-12-02.
  7. Web site: Remapping Keys and Buttons . Autohotkey.com . 2011-12-02.
  8. Web site: Hotstrings and Auto-replace (similar to AutoText and AutoCorrect) . Autohotkey.com . 2005-01-09 . 2011-12-02.
  9. Web site: Hotkeys, Hotstrings, and Remapping . Autohotkey.com . 2018-05-23.
  10. Web site: AutoHotkey Changes and New Features, v1.0.47 - June 19, 2007 . Autohotkey.com . 2011-12-02.
  11. Web site: Author Chris Mallett's post on the AutoHotkey Forums . Autohotkey.com . 2011-12-02.
  12. Web site: An AutoIt / AutoHotkey nonfunctional comparison . Paperlined.org . 2011-12-02 . https://web.archive.org/web/20111208181846/http://paperlined.org/apps/autohotkey/autoit_and_autohotkey.html . 2011-12-08 . dead .
  13. Web site: Author Chris Mallett's post on the AutoHotkey Forums . Autohotkey.com . 2011-12-02.
  14. Web site: Licensing Opinions - AutoIt Forums . Autoitscript.com . 2011-12-02.
  15. Web site: Forum post by Chris, announcing AutoHotkey_L now main platform . Autohotkey.com . 2011-12-02.
  16. Web site: Our History . The AutoHotkey Foundation . 2014-05-26 . 2016-07-23.
  17. Web site: AutoHotekey.dll Module . github.io . 2017-05-13.
  18. Web site: Hotkeyit's AutoHotkey_H fork . GitHub.
  19. Web site: Thqby's AutoHotkey_H fork . GitHub.
  20. Web site: AutoHotkey_H subforum . AutoHotkey.com.
  21. Web site: AutoHotkey v2. AutoHotkey.com . 2021-07-28.
  22. Web site: AutoHotkey v2.0-beta.1 - AutoHotkey Community. 2022-01-11. www.autohotkey.com.
  23. Web site: AutoHotkey v2.0-rc.1. AutoHotkey.com . 2022-11-20.
  24. Web site: AutoHotkey v2.0.0. AutoHotkey.com . 2022-12-20.
  25. Web site: AutoHotkey v2 Official Release Announcement. AutoHotkey.com.
  26. Web site: End of Life: v1.1. AutoHotkey.com.
  27. Web site: .NET Framework Interop - Scripts and Functions. AutoHotkey Community.
  28. Web site: AHK + LUA Interop (stdlib), proof of concept - Scripts and Functions. AutoHotkey Community.
  29. Web site: ahklisp: lisp on win32 with cffi, sbcl, and autohotkey - Scripts and Functions. AutoHotkey Community.
  30. Web site: ahkecl : Embedded common lisp in ahk - Scripts and Functions. AutoHotkey Community.
  31. Web site: Machine code functions: Bit Wizardry - Scripts and Functions. AutoHotkey Community.
  32. Web site: Embedded Windows Scripting (VBScript & JScript) and COM - Scripts and Functions. AutoHotkey Community.
  33. Web site: function hooks - Suggestions. AutoHotkey Community.
  34. Web site: COM Standard Library - Scripts and Functions. AutoHotkey Community.
  35. Web site: LibCon - AutoHotkey Library For Console Support - Scripts and Functions. AutoHotkey Community.
  36. Web site: LowLevel & dynamic code - Scripts and Functions. AutoHotkey Community.
  37. Web site: Human Interface Device(HID) Support.
  38. Web site: Automation IE7 Navigation and Scripting with Tabs - Scripts and Functions. AutoHotkey Community.
  39. Web site:

    SmartGUI Creator :: - Scripts and Functions

    . AutoHotkey Community.
  40. Web site: Sparrow: AHK WebServer w/ AHK in HTML support (sources incl) - Scripts and Functions. AutoHotkey Community.
  41. Web site: [tool] WinEventHook Messages - Scripts and Functions]. AutoHotkey Community.
  42. News: Fauxpersky: CredStealer malware written in AutoHotKey masquerades as Kaspersky Antivirus, spreading through infecting USB drives. Research. Cybereason Nocturnus. 2018-03-29.