WinExistで正規表現を使う SetTitleMatchMode, Regex
F1::
if WinExist("- メモ帳$ ahk_class Notepad") {
MsgBox, メモ帳がある
} else {
MsgBox, メモ帳がない
}
Return
変数を使う場合 F1::
name := "- メモ帳$"
txt = %name% ahk_class Notepad
if WinExist(txt) {
MsgBox, メモ帳がある
} else {
MsgBox, メモ帳がない
}
Return
参考 |
|