AutoHotkey
AutoHotkey
|
|
---|---|
Basic data
|
|
developer | Chris Mallett (Chris), Steve Gray (Lexikos) |
Current version |
1.1.33.02 ( July 17, 2020 ) |
operating system | Windows |
programming language | C ++ |
category | Scripting language |
License | GNU General Public License |
German speaking | Yes |
www.autohotkey.com |
AutoHotkey , shortly AHK is a scripting language and an associated interpreter , with which one the Windows - user can control. AutoHotkey can be used to automate repetitive work tasks under Windows. AutoHotkey is free software .
overview
AutoHotkey runs on Windows 2000 or higher. It works with Windows 95/98 / Me with some restrictions.
AutoHotkey is easy to learn even for novice programmers. The English documentation supplied with the programming language contains a tutorial and complete program examples or at least specific applications for each command. The associated help file AutoHotkey.chm can be replaced by the current German version.
application areas
AutoHotkey is designed to automate repetitive work tasks. With AHK scripts, for example
- look up terms marked in a text in Wikipedia or a dictionary,
- Merge information from incompatible data collections (e.g. proprietary databases and Excel tables),
- Control programs through automatic text input or mouse clicks (which are simulated, for example, depending on the current window content).
With AutoHotkey, both system-wide and program-specific key combinations and functions can be assigned. So you can z. B.
- change the keyboard layout as desired,
- Call up websites with one touch of a button (regardless of whether the web browser is active),
- Hotstrings (AHK term for self-defined abbreviations) automatically replace text entries with another (usually longer) text.
Advanced users can use AutoHotkey to create graphical user interfaces (GUI), work with regular expressions ( PCRE ) or access Windows DLLs or application programs directly.
particularities
It is possible to AutoHotkey scripts into stand-alone executable programs compile . These programs can therefore also be run on Windows computers without AutoHotkey installation. A suitable compiler is part of the AutoHotkey program package. Scripts as well as compiled programs are subject to the license provided by the developer and can therefore also be sold as independent programs. A password can be specified during the compilation process (up to version 1.1). This protects the program from being simply converted back into source code ( decompiling ) as long as the password is not known. The protection achieved in this way, however, does not correspond to that of a binary compiled program . In order not to give this false impression, newer versions (from version 1.1) no longer support password protection.
The tools can also be found in the program package
- AutoScriptWriter , a macro recorder. This registers keystrokes, mouse clicks and identifies the currently active window. He puts these actions into an executable AHK script that later higher speed play can be.
- AU3_Spy , which supplies extensive information on the currently active window (window title, window text, names of buttons, contents of input fields, etc.). The information often helps to identify, evaluate and control windows / dialog boxes.
AutoHotkey program examples
The script says hello world! in a MessageBox:
MsgBox Hallo Welt!
The script starts the Notepad program, waits until the window is active and then types hello world! a:
Run, "notepad.exe"
WinWaitActive, ahk_class Notepad
Send, Hallo Welt{!}
Pressing the key combination Strg + Alt+ Wwill look up a highlighted word on Wikipedia:
^!w::
alteZwischenablage := ClipboardAll
Send, ^c
InternetAnfrage := "http://de.wikipedia.org/w/index.php?title="
. "Spezial%3ASuche&search=" . Clipboard
Clipboard := alteZwischenablage
Run, % InternetAnfrage
Return
The abbreviation MfG is replaced by a hotstring after entering with best regards :
::MfG::Mit freundlichen Grüßen
Deactivates the mouse wheel on the desktop and thus inadvertent zooming:
#IfWinActive, ahk_class Progman
*WheelDown::Return
*WheelUp::Return
Output of some system information in a user-defined interface:
Gui, Font, s10, Verdana
Gui, Add, Text, +Center , % "Hallo " A_UserName "`n"
. "Du nutzt ein " A_OSType "-System`n"
. "(Variante " A_OSVersion ")"
Gui, Add, Button, wp gGuiClose, Beenden
Gui, Show, WikiDemo - User/OS Info
Return
GuiClose:
GuiEscape:
ExitApp
Calculate IBAN checksum
IBAN = GB82 WEST 1234 5698 7654 32
;Leerräume entfernen, Kleinbuchstaben vergrößern
StringUpper, I,% RegexReplace(IBAN, "\s")
;die ersten vier Zeichen an das Ende verschieben
I := SubStr(I, 5) SubStr(I, 1, 4), M := ""
Loop, Parse, I
{ ;Buchstaben zu Zahlen: A zu 10, B zu 11 ...
If A_LoopField is Alpha
M .= Asc(A_LoopField) - 55
Else
M .= A_LoopField
M := Mod(M, 97) ;Modulo 97
} ;schlussendlich muss M = 1 sein, ansonsten ist die IBAN falsch
MsgBox,,IBAN-Prüfsumme ist:,% (M = 1)?"richtig":"falsch"
history
The programmer Chris Mallett began working on AutoHotkey in 2003. The reason for this was that the hotkey support he wanted for the AutoIt 2 program, which was then under the GNU General Public License , did not exist at the time and was also not planned.
Version 1.0 of AutoHotkey was released in February 2004. AutoHotkey can run AutoIt2 scripts, and around 40 AutoHotkey commands are based directly on the AutoIt source code . Some utilities included with AutoHotkey (including the compiler) also come from AutoIt.
AutoIt is no longer an open source program.
On October 10, 2010, developer Chris Mallet announced that he would no longer actively develop AutoHotkey. He lost interest because, unlike other active developers, he never wanted to develop the scripting language into a fully featured programming language. A direct further development, which was developed by some members of the community, is now offered as a download for AutoHotkey on the download page. This official successor is called AutoHotkey 1.1 and offers 64-bit support as well as support for Unicode, arrays and objects. The original version, now called AutoHotkey Basic , does not have these extended functionalities.
2012: AutoHotkey_L became the official version. "Chris" hands over the ownership of the domain www.autohotkey.com to "polyethene".
April 24, 2014: The "AutoHotkey Foundation LLC" is founded, the new official AutoHotkey website is ahkscript.org.
September 22nd, 2015: Agreement with "polyethene". Transfer of the domain autohotkey.com. This is completely migrated to a new server.
See also
Web links
- Official AutoHotkey site (English)
- German AutoHotkey website
- Collection of AutoHotkey Basic scripts under a common user interface , project of the magazine c't
swell
- History of AutoHotkey (English)
- AutoIt and OpenSource (English)
- List of AutoIt commands in AutoHotkey (English)
- Commercial exploitation of own scripts and comparisons Freeware / Open Source (English)
- AutoHotkey decompiler use (English)
- Statement by Chris Mallet about the future of AutoHotkey (English)
Individual evidence
- ↑ Release 1.1.33.02 . July 17, 2020 (accessed July 18, 2020).
- ↑ The autohotkey Open Source Project on Open Hub: Languages Page . In: Open Hub . (accessed October 18, 2018).