#include <GUIConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("窗口检测", 272, 128)
$Button1 = GUICtrlCreateButton("开始监控", 64, 40, 145, 49, BitOR($BS_DEFPUSHBUTTON,$WS_GROUP))
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetData($Button1, "停止监控")
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetData($Button1, "开始监控")
ExitLoop
EndSwitch
If WinExists("[CLASS:TXGuiFoundation; TITLE:提示]") Then MsgBox(0, "", "QQ提示窗口弹出。")
If WinExists("[CLASS:#32770; TITLE:警告!]", "确实要更改该区域的设置吗?") Then MsgBox(0, "", "IE提示窗口弹出")
WEnd
EndSwitch
WEnd
|