/*
┌────┐
│存在判定│
└────┘
WinExist→WinActive…アクティブ判定

■関数
WinExist_1("WinTitle") ;前方一致検索
WinExist_2("WinTitle") ;部分一致検索
WinExist_3("WinTitle") ;完全一致検索
WinExist_R("WinTitle") ;正規表現検索

■使用例
if WinExist_n("WinTitle") ;ウィンドウがあれば
if !WinExist_n("WinTitle") ;ウィンドウがなければ
*/
WinExist_1(WinTitle) {
 SavedTitleMatchMode := A_TitleMatchMode
 SetTitleMatchMode,1
 ErrorLevel := WinExist(WinTitle)
 SetTitleMatchMode,%SavedTitleMatchMode%
return ErrorLevel
}

WinExist_2(WinTitle) {
 SavedTitleMatchMode := A_TitleMatchMode
 SetTitleMatchMode,2
 ErrorLevel := WinExist(WinTitle)
 SetTitleMatchMode,%SavedTitleMatchMode%
return ErrorLevel
}