変更点・新機能

v1.1からv2.0への変更点は、v1.1とv2.0の相違点をカバーしています。

変更点の技術的な詳細については、GitHubを参照してください。

2.0.13 - 2024年4月20日

関数に無効なオプションが含まれているときにValueErrorをスローするように変更しました。

Fixed InputHook to respect the +S option for Backspace when acting as undo.

Fixed debugger to safely handle property deletion during enumeration.

Fixed OLE clipboard content (e.g. error dialog text) being lost on exit.

Fixed detection of invalid suffix on a hotkey, such as Hotkey "a pu".

Fixed DllCall AStr* arg type to copy back only if address changes.

Fixed #Include to correctly "close" any built-in variable it reads (no known impact on real-world scripts).

Fixed WinTitles with two different ahk_id values to yield no match.

2.0.12 - 2024年3月23日

Guiにオーナーウィンドウまたは+DPIScaleがある場合のGui GetPos/GetClientPosを修正しました。

ファイルループでのサブフォルダーの再帰を防止するようにUntil文を修正しました。

Fixed DllCall to throw when arg type is UStr.

RegEx calloutのたびにメモリリークが起きるのを修正しました。

Fixed Send erroneously releasing a modifier due to a race condition. For example, ~LAlt::Send "{Blind}x" intermittently released LAlt if some other keyboard hook was installed more recently than the script's own hook.

Fixed icon loader to prefer higher bit-depth when multiple bitmaps of the same size are present.

Fixed SendInput failing to release LCtrl if it had already released RAlt and the layout does not have AltGr.

Fixed key-up hotkeys not firing if the key repeats after modifiers change. For example, F1::Send "{Ctrl down}" should allow F1 up:: to execute when the key is released even though Ctrl is down, but was not allowing it after key-repeat occurs.

Fixed an error message to refer to #HotIf rather than #IfWin. [PR #327]

Fixed OwnProps erroneously skipping properties with optional parameters.

Fixed inconsistent behaviour of cloned dynamic properties.

Windowsがセーフモードの場合など、ネットワークサブシステムが機能していないときに重大なエラーが発生するSysGetIPAddresses関数を修正しました。

コンソールウィンドウがアクティブな場合など、フォーカスを決定できない場合に ControlGetFocus関数が0を返すように変更しました。

2.0.11 - 2023年12月23日

Windows 10で最初に表示されるメニューがキーボード入力を受け付けない場合の回避策を追加しました。

Fixed the Add method (Gui) to support the ShortDate option for DateTime controls.

Fixed a reference counting error with multi-level function nesting.

Fixed #include <x> causing a load-time crash if used inside a function.

Fixed ListView.Opt("NoSort").

Fixed a memory leak occurring when an object with no own properties is cloned.

Fixed #include and FileInstall (non-compiled) to compare file names ordinally, not linguistically.

2.0.10 - 2023年9月24日

Fixed crashing when a named function hotkey is used after #HotIf.

Fixed numeric literals ending with a dot to not cause line continuation.

Fixed pre-increment/decrement to work with chained array indexing.

Fixed OnNotify/OnCommand applying styles only applicable to OnEvent.

Fixed FileExist/DirExist leaking handles when emptydir\* is used.

Fixed DirExist leaking handles when only files match.

2.0.9 - 2023年9月17日

Fixed stacking of hotstrings with the X option.

Fixed debugger not listing local vars if the function is at the bottom of the stack.

Fixed Gui threads to show on the debugger's call stack.

Fixed some combinations of &/ByRef causing stack overflow in ExitApp.

2.0.8 - 2023年9月11日

Fixed ByRef parameters erroneously assigning the default value to the caller's VarRef if unset.

Fixed some issues affecting suppressed Alt/Ctrl/Shift/Win hotkeys, such as:

Fixed some issues affecting continuation sections:

Optimized the automatic escaping of quote marks and backtick in continuation sections.

Fixed breakpoint_list (debugger) returning duplicates on lines containing fat arrow functions.

Fixed +BackgroundDefault failing to override the Gui's BackColor property.

2.0.7 - 2023年9月2日

Fixed MouseClickDrag to allow X1 and Y1 to be omitted.

Fixed mouse AltTab hotkeys not suppressing execution of a prefix hotkey, such as 1:: for 1 & WheelDown::AltTab. (Broken by v2.0.4)

Fixed hook hotkeys not recognizing modifiers which are pressed down by SendInput.

Fixed A_AhkPath to not be reliant on the case/format of the command line used to launch the process.

Fixed heap corruption during window searches involving groups. (Broken by v2.0.6)

ランチャー

Fixed #Requires not being detected if followed by a comment other than ; prefer xxx. (Broken by v2.0.6)

Fixed syntax detection misinterpreting multi-line auto-replace hotstrings.

Window Spy

Changed font to Segoe UI size 9, consistent with Dash.

2.0.6 - 2023年8月30日

Fixed some ambiguity with COM calls, such as x.y acting as x.y().

Fixed breakpoint on control flow statement being "hit" when a fat arrow function on the line below it returns.

Fixed Default : to not merge with the line below it. This prevented Default : from being used at the end of a Switch block, and caused any subsequent line to take the line number of the Default.

Optimized ProcessGetPath, ProcessSetPriority and ProcessClose to not scan through all processes when given a valid PID, even if access to the process is denied.

Fixed inability of LWin::Alt to be used to activate some Alt key combos.

Fixed TypeError thrown by x is y to say "Class" rather than "Object".

Fixed WinTitle to support criteria longer than 1023 characters.

Fixed issues when &ref is used on different aliases of the same variable.

Fixed optional parameter default expressions (other than simple literal values) preventing the use of assume-global/assume-static.

2.0.5 - 2023年8月12日

Fixed a memory leak caused by incorrect reference counting when an object is enumerated via COM. [PR# 325]

Fixed internal calls to __Enum to not call __Call.

Fixed error messages referring to parameter #65535.

Fixed incorrect IEnumVARIANT return count.

Fixed Download throwing OSError(0) when error should be non-zero.

Fixed LV.Add/Insert/Modify crashing when passed the minimum number of parameters.

Fixed stack traces to exclude calls to __new for Error subclasses.

2.0.4 - 2023年7月3日

エラー/警告ダイアログのリロードボタンを、現在のスクリプトインスタンスが終了していなくても、明示的にダイアログを閉じるように変更。

finallyブロック内でアクセスすると変数が空白に表示される原因となっていたreturn varの最適化を削除。

デフォルト(Switch)でコロンの前にスペースが入るように修正。

Array.Prototype.RemoveAtで、Lengthがunsetまたはvar?

ComObjectが2番目の変数のみ指定されたforループに渡されるとクラッシュする問題を修正。

v1.1.37.00およびv1.1.37.01からの変更をマージ:

COMのメソッドとプロパティの呼び出しで、大きな整数をVT_R8(浮動小数点)ではなくVT_I8として渡すように変更。32ビット範囲の整数はVT_I4として渡される。

IDispatchでラップされたAutoHotkeyオブジェクトで、多変数の列挙子(for-loop)のサポートを追加しました。オブジェクトを呼び出すスクリプトとオブジェクト自体の両方が、サポートされているAutoHotkeyバージョンを実行している必要があります。

AutoHotkeyメソッドがIDispatch(COM)を介して呼び出された場合、省略されたパラメータが「オプション引数マーカー」ではなく、デフォルト値を受け取るように修正されました。逆変換は、以前のバージョンでCOMメソッドを呼び出すときにすでに行われていた。

VerCompare(a, ">" b)を修正し、コードサイズをわずかに縮小。

AltTab関連のロードタイムエラーを他のエラーと矛盾しないように修正。

ComObjectラッパーがオブジェクト/COM経由で呼び出された場合にスローされるエラーが正しく伝搬されない問題を修正。

ホットキーGUIコントロールを修正し、記号 ^, !+をホットキーとして設定できるようにした。

ホットキーコントロールの値がシンボルに設定されている場合、修飾子が含まれるように修正。

InputHook.KeyOpt()が単一文字で誤動作する可能性があったのを修正。

カスタムコンボで、a & b::a::a up::のようなホットキーのセットが、#HotIfでa::だけが無効になっている場合、aのリリースを抑制できないバグを修正。

キーダウンイベントがホットキーによって正しく抑制されるが、SendLevel > 0で追加のキーダウンを送信すると、送信されたイベントが#InputLevelによって無視されても、それに続くキーアップが抑制されないというバグを修正した。

a & b:: が存在するが #HotIf によって無効化されている場合、a & b up::bを抑制しないように修正。

競合状態によりホットキーが起動しない問題を修正しました。もし~*RWin::のようなモディファイアホットキーがSendやGetKeyStateを呼び出すのが早すぎると、OSはRWinがダウンしていないと報告する可能性があり、フックのモディファイアの状態が「修正」され、ホットキーが誤って発火したり、発火しなかったりします。この現象は、他のキーボードフックがスクリプト自身のフックよりも最近にインストールされた場合にのみ発生する可能性がある。その場合、他のフックのスレッドが再開して戻るまで、OSはキーの状態を更新しないからだ。

ホットストリングが#HotIfで設定されたLast Found Windowを使用するように修正した。

OSが自動的にフックをアンインストールした場合、キーボードまたはマウスフックを再インストールしようとすると失敗する問題を修正しました。このような試みを行うには、やはり一定の条件を満たす必要がある。

組み込み IDispatch 用にキャッシュされた COM プロパティ名の割り当てが最適化されました。

DLL として AutoHotkey のビルド設定をサポートするようにコードをリファクタリングしました。

2.0.3 - 2023年6月19日

Hotkey("a", "b")が "a"ではなく、"b"の本来の機能を使うように修正。[PR #318]

FileSetAttribute をファイル読み込みループで使用するとクラッシュする問題を修正しました。[PR #323]

GUIコントロール名の重複エラーを修正し、スレッドを正しく中断するようにした。

DateTime/MonthCal Rangeオプションで最小値が適用されない問題を修正。

s[x] => xと"s"で始まる他の単一行のプロパティを修正。

=>を含む静的行のブレークポイントを削除する際のバグを修正。

ボタンコントロールをクリックするとデフォルトにならない問題を修正

PixelSearchでピクセルが見つからなかった場合にXをセットしないように修正。

エスケープシーケンスが次の行をスキップするホットストリングを修正。

WinTitleで "ahk_"が2文字目にある場合、1文字目を無視するように修正。

右手モディファイアーがすでにダウンしていることを利用するようにリマッピングを修正。例えば、+x::+yは、RShiftを離してLShiftを押すことができなくなる。

a == b && c()と同様の場合のエラーメッセージを変更し、レガシー=を暗示しないようにした。

意図しない行が続く場合のエラーメッセージを改善。

ドキュメントにあるように、予約語をメソッド名として許可するように修正。

一部のキーボード・メッセージのOnMessage呼び出しが重複していたのを修正。

相互参照されたクロージャが早期に削除される問題を修正。

SetFontを修正し、Optionsパラメータの先頭のスペースを許可するようにした。

{ASC nnnn}の送信を修正。

a.base := aがエラーを投げるように修正。

x.y := unsetがクラッシュや未定義の動作を引き起こす問題を修正。

GUIがその親でない場合でも、GuiControl.Move()がGUIのクライアント領域に対して相対的になるように修正しました。

メニュー追加で、メニュー挿入で追加された項目が上書きされるのを修正しました。

ランチャー

パラメータなしで実行した場合、ドキュメントの古いウェルカムページを表示する代わりにDashを実行します。

バージョン選択GUIで、バージョンを選択せずにEnterキーを押すとエラーが発生する問題を修正。[PR UX/#4]

不在のバージョンがダウンロード可能かどうかをチェックする際のエラーを抑制する。

UACが無効になっている場合、UACシールドを表示しないよう、不在バージョンのダウンロードプロンプトを修正。

Requiresの解釈に関する問題を修正。

インストール

コマンドライン用のデフォルトのインストールディレクトリを修正。

スタートメニューのショートカットの名前を "AutoHotkey" から "AutoHotkey Dash" に変更。

SYSTEMとして実行中のEnableUIAccessを修正しました。

証明書選択時にEnableUIAccessが秘密鍵を検証するように修正。

Dash

Launch Config GUIを修正し、「管理者として実行」および「UIアクセスで実行」オプションを更新。

Launch Config GUIにおけるUp/Downキーの処理を修正。

2.0.2 - 2023年1月2日

Short DllCall の arg タイプと、無効なタイプに対する未定義の挙動を修正しました。

AutoHotkeyバイナリのファイルバージョン番号を修正しました(非文字列)。

パラメータタイプのエラーで、正しいパラメータ番号が表示されるように修正しました。

2.0.1 - 2023年1月1日

Func.IsOptional(1)が0を返すべきでない場合があるのを修正しました。

Guiイベントハンドラ関数で、Guiがそれ自身のイベントシンクである場合に、Guiパラメータをドロップしないように修正しました。

COMのエラーで、説明文がない場合に「(null)」が表示されないように修正しました。

ToolTipが断続的に間違った位置に表示されるのを修正しました。

Array、Match、Guiで2つ目の変数を許可するように __Enum(unset)を修正ました。

#include<>のエラーメッセージが「関数ライブラリ」ではなく「スクリプトライブラリ」と表示されるように修正しました。

新規スレッドでCriticalによるメッセージチェックを防止できない問題を修正しました。

DllCallの型名の変換を最適化しました。

些細ですが効果的なコードサイズの最適化を行いました。

プレリリース

v2.0.0リリース以前の変更履歴は、以下を参照してください(ただし、一部の変更は上書きされていることにご注意ください)。