I know this issue has been talked about a lot. I have a beauty of a progress meter, just having difficulty implementing it with a speedy refresh! I've use timed delays
This showed that the updating ISN't depended on time passed but rather focus?
This works because focus is moved from the HTA to the COMSPEC and then back to the HTA. I would assume the focus forces an update to the HTA display. The problem is that this routine is SLOW.
So I tried retriggering focus
But this doesn't work at all.
Removing the progress meter would speed up the routine that uses it by tens of times - but I want that graphical representation. Does anyone have further suggestions or explaination of why this is mostly futile?
-Geates
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
- Martin Golding
"There are seldom good technological solutions to behavioral problems."
- Ed Crowley, Exchange guru and technology curmudgeon
Code:
sub delay (intMilliSecs)
dblStart = cdbl(timer)
do while ((cdbl(timer) - dblStart) < (intMilliSecs / 1000)) : loop
end sub
This showed that the updating ISN't depended on time passed but rather focus?
Code:
sub updateDisplay
set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "%COMSPEC% /c", 0, false
end sub
This works because focus is moved from the HTA to the COMSPEC and then back to the HTA. I would assume the focus forces an update to the HTA display. The problem is that this routine is SLOW.
So I tried retriggering focus
Code:
sub updateDisplay
set objApp = WScript.CreateObject("Wscript.Application")
objApp.AppActivate "appName"
end sub
But this doesn't work at all.
Removing the progress meter would speed up the routine that uses it by tens of times - but I want that graphical representation. Does anyone have further suggestions or explaination of why this is mostly futile?
-Geates
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
- Martin Golding
"There are seldom good technological solutions to behavioral problems."
- Ed Crowley, Exchange guru and technology curmudgeon