AutoHotKey v2
詳細情報
| タイトル | AutoHotKey v2 |
|---|---|
| URL | https://www.autohotkey.com/ |
| バージョン | ver 2.0.28 |
| 更新日 | 2026/09/12 |
| 追加日 | 2024/03/16 |
| 種別 | フリーソフト / オープンソース(GPL) |
| 説明 | キーボード割り当てユーティリティAutoHotKeyのv2。 |
レビュー
概要
AutoHotkey v2(AHK v2)は、Windowsのキーボード・マウス操作を自動化するためのオープンソーススクリプト言語・ユーティリティです。もともとAutoHotkey v1はChris Mallett氏によって2003年に開発が始まり、その後オープンソースコミュニティによって引き継がれました。v2は言語設計を根本から見直した大幅なリニューアル版で、2023年に正式リリースされました。v1との後方互換性はないものの、より一貫した文法と強力な機能を持ち、Windowsの自動化・マクロ作成ツールとして幅広く活用されています。ライセンスはGNU GPL v2のフリー・オープンソースソフトウェアです。
主要な特徴・機能
- ホットキー定義: キーボードショートカットやマウスボタンへの独自機能割り当て
- キーリマップ: 任意のキーを別のキーへ再マッピング
- マクロ・自動入力: テキスト自動入力(オートコレクト・略語展開)やGUI操作の自動化
- スクリプト言語: フォーム入力・自動クリック・ウィンドウ操作など多様なタスクに対応
- v2での改善点: 一貫した式構文・新しい関数・オブジェクト指向サポートの強化・エラー処理の改善
- 初心者〜上級者対応: 簡単なコマンドから複雑なスクリプトまで、幅広いレベルに対応
- GUIツール: スクリプトからカスタムGUIウィンドウを作成可能
- 豊富なライブラリ: コミュニティ製のライブラリ・スクリプトが多数公開されている
対象ユーザー
- キーボード操作を効率化・カスタマイズしたいWindowsユーザー
- 反復作業を自動化したいビジネスユーザー・パワーユーザー
- プログラミングの入門として自動化スクリプトを学びたい初心者
- ゲームや専門業務での複雑なマクロ・ホットキーを必要とする上級ユーザー
ライセンス情報
フリー・オープンソースソフトウェア(GNU GPL v2ライセンス)。Windows向け。最新版はv2.0.21(2026年2月リリース)。ソースコードはGitHubで公開されている。
スクリーンショット
更新グラフ
バージョン履歴
Fixed ControlGetItems/ControlGetChoice not throwing for Tab controls.
Fixed error reporting for ComObjArray().__Enum(), if it ever fails.
Fixed TraySetIcon("HBITMAP:" handle) without *.
Fixed navigation with Tab key in a Gui with a nested Gui (+Parent).
UX/Dash
Added an optional check for AutoHotkey updates, disabled by default. [based on AutoHotkey/AutoHotkeyUX#11 by kczx3]
Fixed errors being raised when arrow keys are used in the Help Files menu. [AutoHotkey/AutoHotkeyUX#24 by iPhilip]
Fixed install-version.ahk to delete the temporary ".staging" directory after installing an upgrade.
Fixed Help Files menu to be displayed at the button, not at the mouse cursor.
Changed "New script" to add the file to recent files.
Changed how key-up events are correlated to key-down events for the purpose of determining whether to suppress key-up. A key-down with SendLevel between 1 and 7 now only correlates with a key-up of the same level. When #InputLevel 1 is in effect, this fixes Right::Send "{Right}" not suppressing key-up, RShift::RAlt interfering with RAlt::RShift and vice versa. Events with SendLevel 8 and above are still grouped with non-sent events for practical reasons.
Fixed WinExist("A",,,"B") to not exclude windows which have no controls.
Fixed custom combo hotkeys with neutral modifiers (e.g. Alt & Esc::) [broken by v2.0.22].
Fixed key-up hotkeys to fire consistently when the key is used as both a prefix and a suffix (e.g. a & b::, b & a:: and
Removed the undocumented effect that a hotkey with the </> prefix had on the corresponding modifier key; e.g. <^a:: causing LCtrl:: to fire on release, inconsistent with the documentation. Always firing on press provides greater consistency and flexibility. The modifier key itself was suppressed since v2.0.20. Neutral modifiers such as Ctrl:: always fire on release, and similar behaviour can be implemented with A_PriorKey and ~LCtrl up::.
Changed error dialogs to use msftedit.dll instead of riched20.dll to fix the following issues:
- Hanging when inspected by UI Automation.
- Broken characters and inconsistent fonts when the error message includes certain character sets (e.g. emoji, Chinese or Arabic).
Fixed errors within __Delete being su
Fixed StrGet crashing when given an address and not a length. (Broken by v2.0.20)
Fixed potential undefined behaviour in message callbacks during script termination.
Fixed Run not closing the process handle.
Fixed GuiFromHwnd crashing if passed another script's GUI window HWND.
Fixed leading space in For( a in b ) incorrectly raising an error.
Fixed enumerator calls (For) treating implicitly returned "" as true.
Fixed A_maxHotkeysPerInterval and A_Hotkeyinterval returning incorrect values if spelled in lower case.
Fixed FileSelect duplicating the filter pattern if it lacks *..
Fixed ListBox tab-stop spacing when T option is used during control creation. [PR #346]
Fixed ~RAlt & <:: causing RAlt:: to fire on release despite ~ (and likewise with other L/R modifier keys).
Fixed re
Fixed memory out-of-bounds access during RegEx compilation.
Fixed externally-released modifiers to not be "restored" post-Send.
Fixed modal dialog boxes suppressing InputHook events.
Fixed key-up erroneously being suppressed after key-repeat presses it down in some cases.
Fixed Critical Error when loading large icons with no alpha channel.
Fixed MouseGetPos to make Control blank and not throw if ClassNN cannot be determined.
Fixed FileSelect to validate Options.
Fixed unexpected Catch/Else/Finally/Until not being flagged as an error in some cases.
Fixed Try/Catch/Else/Finally not executing Finally if Else returns.
Fixed execution of if-else-if-else-if containing fat arrow functions.
Fixed A_Clipboard silently exiting when GetClipboardData returns NULL.
Fixed a.b[c] := d to invoke the getter for a.b if there is no setter.
Implemented an optimization to the WinText parameter by Descolada. [PR #335]
Changed UnsetError message to suggest a global declaration instead of appending "(same name as a global)" after the variable name.
Changed VarUnset warning message for consistency with UnsetError.
Fixed the increment/decrement operators to throw UnsetError if the var is unset, not TypeError.
Fixed OwnProps to assign the property name safely in cases where a property deletes itself.
Fixed breakpoints to work in arrow functions under a control flow statement without a block.
Fixed debugger to break at the line of the call when stepping out of a function. (This behaviour was added in Revision 31 and broken by v1.1.30.00.)
Stepping out of a function which was called as a new thread now breaks at the line which was interrupted, instead