检查指定窗口是否存在且被激活.
WinActive ( "标题" [, "文本"] )
If WinActive("[CLASS:Notepad]") Then MsgBox(0, "", "窗口激活") EndIf