AutoHotkey バージョン2では、#IfWinActive、#IfWinExist、#IfWinNotActive、#IfWinNotExist が削除され、代わりに #Hotif になった。
例えば AutoHotkey バージョン1の #IfWinActive は、バージョン2では以下のように書く。
#HotIf WinActive("ahk_class TeamsWebView")
!a::
{
MsgBox "Teamsです"
}
#HotIf
逆に #IfWinNotActive は以下のように書く。
#HotIf !WinActive("ahk_class TeamsWebView")
!a::
{
MsgBox "Teamsではありません"
}
#HotIf
もしくは以下のようにも書ける。
#HotIf Not WinActive("ahk_class TeamsWebView")
!a::
{
MsgBox "Teamsではありません"
}
#HotIf


コメント