I have an HTA which should be updating a progress bar in real time, here is the code which updates the bar:
dim progress
dim objExec
Set objExec = wshShell.Exec("wscript " & chr(34) & compilePath & chr(34) & " " & startYear & " " & endYear & " " & savePath)
Do until objExec.StdOut.AtEndOfStream
progress = objExec.StdOut.ReadLine()
If Left(progress, 2) = "P2" Then
progress = Mid(progress, 3, 100)
End If
dMeterWrap.style.visibility = "visible"
dMeterValue.style.width = progress
dMeterText.innerHTML = "<b>Processing " & progress & "</b>"
Loop
the HTA is frozen while the script runs and updates "dMeter" (the progress bar) once the script is done running.
if i add a msgbox in the Do Loop it refreshes the window but i dont want to have to click a message box every
few seconds.