本帖最后由 srhack 于 2012-4-5 16:09 编辑 #include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <DateTimeConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 295, 140, 192, 114)
$Date1 = GUICtrlCreateDate("", 40, 48, 80, 20, BitOR($DTS_UPDOWN,$DTS_TIMEFORMAT))
$Combo1 = GUICtrlCreateCombo("", 176, 48, 49, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1,"关机|重启", "重启")
$Button1 = GUICtrlCreateButton("执行", 40, 88, 81, 33)
$Button2 = GUICtrlCreateButton("退出", 160, 88, 81, 33)
$Label1 = GUICtrlCreateLabel("当前时间:", 48, 8,170, 17)
GUICtrlSetData($Label1,"当前时间: "&@HOUR&":"&@MIN&":"&@SEC&" "&@MON&"月"&@MDAY&"日")
GUICtrlSetColor(-1, 0xFF0000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$t1 = ""
$t2 = ""
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
case $Button2
exit
case $Button1
EndSwitch
$t1=@HOUR&":"&@MIN&":"&@SEC;$T3等于当前时间
If $t1 <> $t2 then
GUICtrlSetData($Label1,"当前时间: "&@HOUR&":"&@MIN&":"&@SEC&" "&@MON&"月"&@MDAY&"日")
$t2=$t1
EndIf
WEnd
请教下如果当我点执行时。。,怎么才能在指定的时候呢,,关机或启起呢,,也就是定时关机重起。。。。 |