AutoHotkey is a free, open-source custom scripting language for Microsoft Windows, initially aimed at providing easy keyboard shortcuts or hotkeys, fast macro-creation and software automation that allows users of most levels of computer skill to automate repetitive tasks in any Windows application. User interfaces can easily be extended or modified by AutoHotkey (for example, overriding the default Windows control key commands with their Emacs equivalents). The Autohotkey installation includes its own extensive help file with an always updated web based version.
You can write mouse or keyboard macros, remap keys, create hotkeys, expand abbreviations, change clipboard contents, and make executables to run hotkey scripts on computers without AutoHotkey installed.
Version | Release Date |
---|---|
v1.0.48.05 | 2009-09-26 |
v1.0.97.02 | 2011-04-14 |
Version | Release Date |
---|---|
v1.1.24.00 | 2016-05-22 |
v1.1.24.01 | 2016-08-02 |
Version | Release Date |
---|---|
v2.0-a069 | 2015-10-24 |
v2.0-a070 | 2015-11-09 |
v2.0-a071 | 2015-12-25 |
v2.0-a072 | 2015-12-25 |
v2.0-a073 | 2016-02-05 |
v2.0-a074 | 2016-03-11 |
v2.0-a075 | 2016-06-03 |
Gui, +AlwaysOnTop +Disabled -SysMenu +Owner ; +Owner avoids a taskbar button.
Gui, Add, Text,, Some text to display.
Gui, Show, NoActivate, Title of Window ; NoActivate avoids deactivating the currently active window.
Show a "Hello World!" in message box.
MsgBox, Hello World!
Show a "Hello World!" in tooltip.
#Persistent
Tooltip, Hello World!
Show a "Hello World!" message in the traybar edit.
#Persistent
TrayTip,, Hello World!
Prints "Hello, World" to Standard Output (stdout).
FileAppend, % "Hello, World", *
Once you have AutoHotkey installed, you will probably want it to do stuff. AutoHotkey is not magic, we all wish it was, but it is not. So we will need to tell it what to do. This process is called "Scripting".
So now that you have created a script, we need to add stuff into the file. For a list of all built-in commands, function and variables, see section 5. Here is a very basic script containing a Hotkey which types text using the Send command when the hotkey is pressed.
^j::
Send, My First Script
Return
We will get more in-depth later on. Until then, here's an explanation of the above code.
^j::
is the Hotkey. ^
means CTRL
, j
is the letter j. Anything to the left of ::
are the keys you need to press.Send, My First Script
is how you SEND
keystrokes. SEND
is the command, anything after the comma (,) will be typed.Return
. Return will become your best friend. It literally STOPS code from going any further, to the lines below. This will prevent many issues when you start having a lot of stuff in your scripts.From Autohotkey Site Documentation
Use as portable software
If you have chocolatey installed, run the following command as an admin user
choco install autohotkey
Alternatively, it can be built from the source code. See here for details:
https://github.com/Lexikos/AutoHotkey_L/
Gui, Add, Text,, Hello World!
Gui, Show, w200 h200
return
GuiClose:
ExitApp