>>760
関数などの別スレッドの各種設定は終了すると
規定値(AutoExecuteセクションの設定)に戻るので戻す必要はないよ

> SavedTitleMatchMode := A_TitleMatchMode
> SetTitleMatchMode,%SavedTitleMatchMode%

大量の関数ではなく引数を使おう

MsgBox % isWindow(, 2, "電卓")
return

isWindow(Active=0, MatchMode=1, WinTitle="A", WinText="", ExcludeTitle="", ExcludeText="") {
 SetTitleMatchMode %MatchMode%
 return (Active ? WinActive(WinTitle, WinText, ExcludeTitle, ExcludeText)
          : WinExist(WinTitle, WinText, ExcludeTitle, ExcludeText))
}