本帖最后由 lin6051 于 2013-4-26 20:54 编辑 #include <Timers.au3>
dim $iTime0=_Timer_SetTimer('',1000,'test')
Example1()
Func Example1()
$hgui=GUICreate("My GUI")
$Button_1 = GUICtrlCreateButton("测试按钮", 0, -1)
GUISetState(@SW_SHOW)
while 1
Local $msg = GUIGetMsg()
Select
Case $msg = -3
Exit
Case $msg = $Button_1
msgbox(0,'','111')
EndSelect
wend
EndFunc
Func test($hWnd, $iMsg, $iwParam, $ilParam)
_Timer_KillTimer('', $iTime0)
sleep(5000) ;这里安装软件需要好些时间
EndFunc
[已经解决]事件模式为佳,多进程亦可 |