上記のコメントで、この条件付きの無効化は不要だと思いますが、ここにいくつかのコードを示します。文字 f を使用し、メモ帳でテストしました。f を押すと Hello が返される ^f を押すと hELLO が返されるはずですが、#IF が true ではないため、システムが通常の Ctrl+f を送信するため、メモ帳の検索が開きます。!f と同じで、[ファイル] メニューが開きます。警告 #IF を機能させるには、autoHotKey_L をインストールする必要があります。
#If (NOT ((GetKeyState("Control", "P")) OR (GetKeyState("Alt", "P"))))
f::Send, Hello ; Should execute as long as Ctrl or Alt are not pressed.
*a::Send, QQQQ ; The * ignores all modyfiers, not executed when Alt or Ctrl is pressed.
^f::Send, hELLO ; should never execute due to #IF = False
!f::Send, olleh ; should never execute due to #IF = False
#IF