Login | |
|
 |
RE: Pause in HTA - setInterval, proper object - 7/27/2007 12:49:50 AM
|
|
 |
|
| |
CondoPC
Posts: 118
Score: 0
Joined: 7/23/2007
Status: offline
|
I like that, thanks. I just need to identify the setInterval and clearInterval process. I have been toubleshooting this for about a day. I don't like the "sleep by launching external script" method because it pops up windows and can be distracting to the admin maiking them think something else is happening.
|
|
| |
|
|
|
 |
RE: Pause in HTA - setInterval, proper object - 7/27/2007 2:10:51 AM
|
|
 |
|
| |
CondoPC
Posts: 118
Score: 0
Joined: 7/23/2007
Status: offline
|
the problem is that cscript runs in a command window, so on my system it pops up a command window every time it launches the sleep script. my sleep script is below '=== Pause the script for desired milliseconds == Sub ScriptSleep(MSecs) Set fso = CreateObject("Scripting.FileSystemObject") strText = "Please wait while the service responds" If Fso.FileExists("sleeper.vbs")=False Then Set objOutputFile = fso.CreateTextFile("sleeper.vbs", True) objOutputFile.Write "wscript.echo " & strText objOutputFile.Write "wscript.sleep WScript.Arguments(0)" objOutputFile.Close End If CreateObject("WScript.Shell").Run "sleeper.vbs " & MSecs,1 , True End Sub I notice that you used objShell.Run commandline, 0, True - I am using 1 - that must be why mine display and yours is hidden. Thanks for the info, I will have to use it since setInterval is not working for me based on my findings.
|
|
| |
|
|
|
 |
RE: Pause in HTA - setInterval, proper object - 7/27/2007 3:29:12 AM
|
|
 |
|
| |
Rischip
Posts: 510
Score: 2
Joined: 3/26/2007
Status: offline
|
% of CPU usage is not a Single metric to judge a function. When the CPU is at "100%" usage, is the system still responsive ?
_____________________________
Rischip Author of - The Grim Linker
|
|
| |
|
|
|
 |
RE: Pause in HTA - setInterval, proper object - 7/27/2007 6:51:23 AM
|
|
 |
|
| |
CondoPC
Posts: 118
Score: 0
Joined: 7/23/2007
Status: offline
|
Rischip, I am not sure your what your getting at. If you are refering to my "hang", it meant that the script looped infinitely and the MSHTA was unresponsive and would not refresh the window. With the script samples in this post and others, I was able to complete my first HTA script that performs service management with on-screeen output and status. It even disables and changes the text of buttons while running. Once I get it cleansed of company specific data, I'll post it into the script library. Thanks all!
|
|
| |
|
|
|
 |
RE: Pause in HTA - setInterval, proper object - 7/27/2007 7:29:39 AM
|
|
 |
|
| |
Rischip
Posts: 510
Score: 2
Joined: 3/26/2007
Status: offline
|
My bad, I posted this in the wrong spot. It was meant toward the HTA wscript.sleep kludges that people have come up with. Some of the best ones spike the CPU, but have no effect on system responsiveness. I had too many windows open and like an i diot posted in the wrong one.
< Message edited by Rischip -- 7/27/2007 7:30:55 AM >
_____________________________
Rischip Author of - The Grim Linker
|
|
| |
|
|
|
|
|