#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt('TrayMenuMode', 1) ;单击不暂停
Dim $s
Opt("WinTitleMatchMode", 2)
Opt("SendKeyDelay", 200)
GUICreate("颜色显示", 300, 160)
$jkbutton = GUICtrlCreateButton("开始监控", 30, 100, 60)
$tzbutton = GUICtrlCreateButton("停止监控", 120, 100, 60)
$sj = @HOUR & @MIN
$tj = 0
GUISetState(@SW_SHOW)
While 1
$msg1 = GUIGetMsg()
Switch $msg1
Case -3
Exit
Case $tzbutton
$tj = 0
Case $jkbutton
$tj = 1
EndSwitch
While @SEC == 20 And $tj == 1
;$var = PixelGetColor( 1323 , 916 )
If WinActive("无标题 - 记事本", "") = 0 Then
WinActivate("无标题 - 记事本", "")
EndIf
Sleep(50)
$zc = ControlGetText("无标题 - 记事本", "", "Edit1")
ControlSetText("无标题 - 记事本", "", "Edit1", $zc & "---" & @HOUR & ":" & @MIN & ":" & @SEC)
WEnd
WEnd
|