#NoTrayIcon
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUICloseOnESC", 0)
Global $time = 30 ;倒计时时间 单位为秒
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("安全套装选择", 410, 370, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_GROUP))
$Group1 = GUICtrlCreateGroup("", 6, 2, 393, 337)
$Label1 = GUICtrlCreateLabel("温馨提示:系统将在30秒后默认选择360安全套餐", 23, 274, 368, 22)
GUICtrlSetFont(-1, 12, 400, 0, "Verdana")
$Icon1 = GUICtrlCreateIcon("D:\小工具\2.ico", -1, 50, 80, 128, 128)
$Icon2 = GUICtrlCreateIcon("D:\小工具\1.ico", -1, 233, 79, 128, 128)
$Label2 = GUICtrlCreateLabel("360安全套装", 60, 224, 98, 22)
GUICtrlSetFont(-1, 12, 400, 0, "Verdana")
$Label3 = GUICtrlCreateLabel("QQ管家安全套装", 229, 222, 126, 22)
GUICtrlSetFont(-1, 12, 400, 0, "Verdana")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Progress1 = GUICtrlCreateProgress(16, 304, 369, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
AdlibRegister("_timer", 1000)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Icon1
AdlibUnRegister()
ShellExecute("notepad.exe")
Case $Icon2
AdlibUnRegister()
ShellExecute("calc.exe")
EndSwitch
If $time <= 0 Then ExitLoop
WEnd
ok()
Func _timer()
$time -= 1
GUICtrlSetData($Label1,"温馨提示:系统将在"&$time&"秒后默认选择360安全套餐")
GUICtrlSetData($Progress1, (30 - $time) / 0.3)
If $time <= 0 Then AdlibUnRegister()
EndFunc ;==>_timer
Func ok()
ShellExecute("notepad.exe")
EndFunc