Вы имеете в виду прогрессбар?Как отобразить в гуи
#include <GUIConstantsEx.au3>
#include <IE.au3>
$Form1 = GUICreate("Проба", 300, 200, -1, -1)
$Button1 = GUICtrlCreateButton("Поехали", 100, 20, 100, 30)
$Progress1 = GUICtrlCreateProgress(5, 100, 290, 22)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_MyProgress()
WinSetState("[Class:IEFrame]", "", @SW_MAXIMIZE)
WinWait("[Class:IEFrame]")
WinActivate("[Class:IEFrame]")
$oIE = _IEAttach("", "instance", 1)
_IENavigate($oIE, "http://www.google.ru/")
EndSwitch
WEnd
Func _MyProgress()
Dim $aPercent[1]
Local $i = 0
Local $timeout = TimerInit()
GUICtrlSetState($Button1, $GUI_DISABLE)
GUICtrlSetData($Progress1, "")
Run("""C:\Program Files\Internet Explorer\iexplore.exe"" http://usde.biz/", "", @SW_HIDE)
While 1
If TimerDiff($timeout) > 20000 Then
GUICtrlSetState($Button1, $GUI_ENABLE)
MsgBox(0, "Ошибка.", "Превышен лимит времени.", 3)
Return
EndIf
Sleep(5)
$sTest = StatusbarGetText("[Class:IEFrame]")
$sTest = StringLeft($sTest, StringInStr($sTest, ")"))
$sTest = StringRegExpReplace($sTest, "[^0-9]", "")
If StringIsDigit($sTest) = 1 Then
$i += 1
ReDim $aPercent[UBound($aPercent) + 1]
$aPercent[$i] = $sTest
$iPercent = ($aPercent[1] - $aPercent[$i]) / $aPercent[1] * 100
GUICtrlSetData($Progress1, $iPercent)
EndIf
If StatusbarGetText("[Class:IEFrame]") = "Готово" Then ExitLoop
WEnd
GUICtrlSetData($Progress1, 100)
GUICtrlSetState($Button1, $GUI_ENABLE)
MsgBox(0, "Готово!", "Страница загружена.", 3)
EndFunc ;==>_MyProgress
;...
WEnd
GUICtrlSetData($Progress1, 100)
BlockInput(0)
;...
[autoit]While 1
Sleep(100)
ToolTip(StatusbarGetText("[CLASS:IEFrame]"),0,0)
WEnd
AutoItSetOption("WinTitleMatchMode", 2)
While 1
Sleep(100)
ToolTip(ControlGetText("Internet Explorer", "", "[CLASS:msctls_statusbar32;INSTANCE:1]"),0,0)
WEnd
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
$hWin = GUICreate("Embedded Web control Test", 300 , 123, 10,10)
$label = GUICtrlCreateLabel('Загружено: 0 %',5,5,100,20)
$progressbar1 = GUICtrlCreateProgress(5, 20, 200, 20)
GUISetState() ;Show GUI
$oIE=ObjCreate("InternetExplorer.Application.1") ; Create Internet Explorer application
$SinkObject=ObjEvent($oIE,"IEEvent_","DWebBrowserEvents2") ; Assign events to UDFs starting with IEEvent_
; Do some browsing activities
$oIE.Visible=1
$oIE.RegisterAsDropTarget = 1
$oIE.RegisterAsBrowser = 1
$oIE.Navigate( "http://www.AutoItScript.com/" )
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
EndSelect
WEnd
Func IEEvent_ProgressChange($Progress,$ProgressMax)
$percent = Int( ($Progress * 100) / $ProgressMax )
If $percent >= 0 And $percent <= 100 Then
GUICtrlSetData($label,'Загружено: '&$percent&' %')
GUICtrlSetData($progressbar1,$percent)
EndIf
EndFunc
$Inp1 = 380990000000
$Inp2 = 380999999999
For $i = $Inp1 To $Inp2
$pr = Int( (($i-$Inp1) * 100) / $Inp2 )
GUICtrlSetData($Progress1, $pr)
Next