#include <WindowsConstants.au3>
$Form1 = GUICreate("请确认您的信息", 234, 98, 192, 114)
$Button1 = GUICtrlCreateButton("确定", 24, 48, 75, 25, -1)
;这里最后加个 -1 或者 default 已经选择了执行了
$Button2 = GUICtrlCreateButton("取消", 120, 48, 75, 25)
$Label1 = GUICtrlCreateLabel("默认10秒后运行记事本,手动点击确定立即执行记事本,点击关闭或取消关闭本程序不运行记事本", 8, 8, 214, 33)
GUISetState()
AdlibRegister('Notepad', 10000)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case - 3, $Button2
Exit
Case $Button1
Notepad()
EndSwitch
WEnd
Func Notepad()
AdlibUnRegister('Notepad')
Run('Notepad.exe')
EndFunc ;==>Notepad
|