A Brief Testimonial
_
AutoHotkey is one of the simplest
programming languages out there, and one of the easiest for beginners
to learn. It is also amazingly powerful. You would be hard pressed to
find a computing task that AutoHotkey cannot do.
- Automate repetitive actions in video games.
- Create keyboard shortcuts called hotkeys which can open files and folders, launch applications or perform various file operations such as Move Copy or Delete. In fact you can perform just about any action your computer is capable of with a few keystrokes.
- Use hotstrings to auto correct spelling and expand abbreviations as you type them. Type “btw” and get “by the way”.
- Directly remap your keyboard. Switch the function of almost any key with almost any other key, or make multiple keys perform the same function. Useful if you have missing or broken keys, or you just don't like the standard QWERTY keyboard layout.
- Fill out forms with perfect accuracy, very useful for anyone who has to type out the same information often.
- Monitor and edit clipboard content on the fly.
- Create custom GUIs and tray menus.
- Open, close, maximize, minimize, resize, reposition, set transparency and otherwise manipulate Explorer windows at will.
How it Works
_AutoHotkey is an interpreted scripting language. A script is simply a
text file containing a set of instructions for your computer to follow
in a particular order. You can have it pop open a message box that says
“Hello World!” or it can open MS Paint and draw a picture of a sad
clown wearing a sombrero; what it does and how it does it is up to you.
The “Interpreted” part means that when you run a script the interpreter, autohotkey.exe, reads these instructions and translates them into machine code that your computer can understand and follow. AutoHotkey also comes with a compiler, which can take the script of your choice and bundle it with a simplified interpreter into an executable file. These .exe files can run on other computers, whether they have the AutoHotkey interpreter installed or not.
AutoHotkey is available in several variants, the two main branches are AutoHotkey Basic and AutoHotkey_L. AutoHotkey Basic is the original and most stable, but it lacks some more advanced capabilities including Unicode and 64-bit support. AutoHotkey_L does almost everything Basic can, but also offers Unicode and 64-bit support, as well as a list of new features and improvements. If you are just learning to use AutoHotkey you should go with AutoHotkey_L.
Both versions are available as an installer and as a 'portable' ZIP file. The portable versions can be carried on a flash drive so you can run your scripts anywhere, without needing to install anything or compile your scripts ahead of time.
The “Interpreted” part means that when you run a script the interpreter, autohotkey.exe, reads these instructions and translates them into machine code that your computer can understand and follow. AutoHotkey also comes with a compiler, which can take the script of your choice and bundle it with a simplified interpreter into an executable file. These .exe files can run on other computers, whether they have the AutoHotkey interpreter installed or not.
AutoHotkey is available in several variants, the two main branches are AutoHotkey Basic and AutoHotkey_L. AutoHotkey Basic is the original and most stable, but it lacks some more advanced capabilities including Unicode and 64-bit support. AutoHotkey_L does almost everything Basic can, but also offers Unicode and 64-bit support, as well as a list of new features and improvements. If you are just learning to use AutoHotkey you should go with AutoHotkey_L.
Both versions are available as an installer and as a 'portable' ZIP file. The portable versions can be carried on a flash drive so you can run your scripts anywhere, without needing to install anything or compile your scripts ahead of time.
Getting Started
If you would like to give AutoHotkey a
try, here is a short list of online resources:
AutoHotkey.com
_
Wikipedia
All of the information in the online documentation is also included as a help file with the program installer. If you post a question in the help forum be sure to carefully read "How to Get Answers Effectively" at the top of the page. You are far more likely to get a satisfactory result if you follow the instructions.
AutoHotkey.com
_
- Downloads – Select which variant is right for you.
- Documentation – A complete listing of commands and how to use them.
- Help forum – Post questions and ask for help from the AHk experts.
Wikipedia
- AutoHotkey - A whole lot of info on the AutoHotkey scripting language.
- Interpreted languages - More detailed information on interpreted programming languages in general.
All of the information in the online documentation is also included as a help file with the program installer. If you post a question in the help forum be sure to carefully read "How to Get Answers Effectively" at the top of the page. You are far more likely to get a satisfactory result if you follow the instructions.
Examples
Here are some of my scripts. Most of these are just simple examples for illustrative purposes, but a few are fairly complex. the later are either scripts I use myself that would not be of much use to anyone else as they are, or they just aren't refined enough to release with the other applications on this site.
Since a single script may consist of multiple elements, I have applied the following color scheme:
Since a single script may consist of multiple elements, I have applied the following color scheme:
- Blue - AutoHotkey code to be copied to a file with a .ahk extension.
- Green - Script comments, which do not effect how the script works but provide useful information. Any comments in a script may be safely removed if you prefer.
- Orange - .ini code, which may be required for a .ini file separate from the primary .ahk file.
- Rapid Fire - With Toggle - One of the most popular scripts on the help forum.
- Spamming - With Hold - Repeatedly sends a single key as long as that key is being held.
- Hotkeys - A basic example showing the two most common ways of creating a hotkey.
- Hotstrings - Autoreplace and code actualization at their finest.
- Simple Remap - Swapping a few keys, just for the heck of it.
- Random With a Twist - The usual number range, but with a 'blackout zone'.
- Scheduled Tasks - Perform just about any action on a day and time of your choosing.
- Hyper Mouse - Makes the cursor continuously, and randomly, move around the screen.
- Double Click (KeyWait) - A simple 'double click' example relying on the KeyWait command.