#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 305, 145, -1,-1)
$Button1 = GUICtrlCreateButton("退出", 64, 40, 105, 49, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Msg = MsgBox (48+4,"","是否重启程序?")
IF $Msg = 6 Then
Run(@ComSpec&" /c ping 127.1 -n 3&start "&FileGetShortName (@ScriptFullPath),"",@SW_HIDE)
exit
EndIf
EndSwitch
WEnd
|