#include <GUIConstants.au3>
GUICreate("自动安装", 401, 221, 193, 125)
GUISetBkColor(0xFFFFFF)
$Group1 = GUICtrlCreateGroup("", 24, 24, 353, 137)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton ("安装", 192, 176, 83, 33, 0)
$Close = GUICtrlCreateButton ("关闭", 304, 176, 75, 33, 0)
$Progress1 = GUICtrlCreateProgress(24, 184, 142, 17)
GUICtrlSetColor(-1,32250)
GUISetState()
AdlibEnable("Progress2",100)
Dim $i = 1
While 1
$Msg = GUIGetMsg()
Select
Case $msg = $Button1
Run('notepad.exe')
ExitLoop
Case $msg = $GUI_EVENT_CLOSE or $msg = $Close
ExitLoop
EndSelect
WEnd
Func Progress2()
GUICtrlSetData ($Progress1,($i/50)*100)
$i += 1
If $i = 50 Then
Run('notepad.exe')
Exit ;=====退出======
EndIf
EndFunc
[ 本帖最后由 夜苦寒 于 2008-5-20 22:52 编辑 ] |