|
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, for example, 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:
ExamplesThe 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.
#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. See also
External links
|
||||||||||||||||||||||||||||
This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.
Mercedes Car
This site monitored by SitePinger.net