「AutoHotKeyを使う準備をする」の記事にしたがってAutoHotKeyのスクリプトファイルを作成すると、ファイルの中身は以下のような記述になっていると思います。
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
このスクリプトファイルを使い始める前に、念のために、以下の1文を追加しておきましょう。
#SingleInstance force
この1文は、同じスクリプトファイルが多重実行されないようにするための、おまじないです。
以下のように記述したら、上書き保存しておきましょう
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. #SingleInstance force SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
“AHKスクリプトを作ったら、おまじないを追加する” への 1 件のフィードバック