AutoHotkey
From Wikipedia, the free encyclopedia
AutoHotkey | |
---|---|
Developed by | Chris Mallett |
Latest release | 1.0.47.06 / Mar 9, 2008 |
OS | Microsoft Windows |
Genre | Automation GUI utility |
License | GPL |
Website | http://www.autohotkey.com/ |
AutoHotkey is a free, open source macro-creation and automation software utility which allows users to automate repetitive tasks and modify the Windows user interface. It is driven by a custom scripting language that is aimed specifically at providing keyboard shortcuts or hotkeys, and is intended to be backwards compatible with the AutoIt2 language.
Many simple and repetitive tasks can be automated with this system. Scripts can launch programs, open documents, send keystrokes and mouse clicks, assign, retrieve, and manipulate variables, run loops, and manipulate windows, files, and folders. These scripts are often triggered through the use of hotkeys. For example, a script might have code that would open an internet browser whenever the user presses ctrl-alt-i. Keys can also be remapped or disabled, such that pressing the letter q, for example, might result in the computer receiving an r, or nothing at all. AutoHotkey also allows for 'hotstrings' to be replaced as they are typed, i.e., turning "btw" into "by the way".
More complex tasks can be achieved with custom data entry forms (GUI windows), working with the system registry, or using a window's own API by manipulating certain DLLs. The scripts can be compiled into an executable file that can be run on other computers that do not have AutoHotkey installed.
Common AutoHotkey tasks:
- Remapping the keyboard, such as from QWERTY to Dvorak or other alternative keyboard layouts.
- Using shortcuts to fill in frequently-used filenames or other phrases.
- 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.
[edit] Examples
The following scripts allow the user to search for a particular word or phrase using Google. After selecting the text from any application and copying it to the clipboard, pressing the configurable hotkey will open the default browser and perform the search.
- Hotkey is Win + g
#g:: Run, http://www.google.com/search?q=%Clipboard% Return
AutoHotkey is often used to automate typing. For example the following script allows a Wikipedian using Firefox to right click on a user name or IP link and copy its value into variables with the hotkeys CTRL-SHIFT-W and CTRL-SHIFT-E. Then with the hotkey CTRL-SHIFT-R, the program uses the variables to produce an edit summary.
^+w::last := CopyUser( ) ^+e::edit := CopyUser( ) 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 } ^+r::Send revert edits by [[Special:Contributions/%edit%|%edit%]] to last version by %last%
There are many more examples of what can be done with AutoHotkey in the scripts and functions section of their forum. Many of these scripts have also have been sorted into a catalogue based on the purpose of the script.
[edit] See also
- AutoIt
- Automator (for Macintosh)
- Bookmarklet
- iMacros for Firefox
- Visual Basic
[edit] External links
- Official site
- Documentation
- AutoHotkey.net - a repository of user projects and archives of major releases
- Script Showcase - collection of exemplary scripts
- Community forum and IRC #autohotkey on freenode