请教一下大虾们,如何在进度条一直滚动当中前后执行文件,执行文件的同时,进度条还要一直在滚动,请问这样能否做到?
这两个用那个都可以,谢谢了!#include <GuiConstants.au3>
Opt("GUIOnEventMode", 1)
dim $start=0
Global Const $PrCopyGui = GUICreate("测试", 220, 40)
$Progress = GUICtrlCreateProgress(6, 10, 207, 20)
GUISetState(@SW_SHOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "gui")
While 1
If $start >= 0 Then
GUICtrlSetData($Progress, $start)
Sleep(50)
$start+=1
If $start >= 100 Then $start = 0
Endif
WEnd
Func gui()
Switch @GUI_CtrlId
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
EndFunc ;==>gui
第二段:ProgressOn("进度条", "Increments every second", "0 %")
For $i = 1 to 100 step 1
sleep(100)
ProgressSet( $i, $i & " %")
Next
ProgressSet(100 , "完成", "Complete")
sleep(500)
ProgressOff()
|