hello
windows environment i can use wscript.sleep,
but in hostmonitor vbs shell script environment why can not use wscript.sleep it say lack of wscript
please who can help?
tks much
why vbs shell script can not support sleep command
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Do not see any problems with VB sleep command in Shell Script test.
You may try the following demo script that works well on our system:
Start CMD: cmd /c cscript /B /E:VBScript %Script% %Params%
Script requires one parameter <seep time in milliseconds>
You may try the following demo script that works well on our system:
Code: Select all
Option Explicit
On Error Resume Next
const statusOk = "scriptRes:Ok:"
const statusBad = "scriptRes:Bad:"
const statusUnknown = "scriptRes:Unknown:"
dim objArgs, sl
Set objArgs = WScript.Arguments
if (objArgs.Count<1) then
WScript.StdOut.Write statusUnknown&"One parameter required <sleep time in milliseconds>"
WScript.Quit
end if
sl = CInt(objArgs(0))
If Err.Number <> 0 Then
WScript.StdOut.Write statusUnknown&"["&objArgs(0)&"] "&Err.Description
WScript.Quit
End If
WScript.sleep sl
WScript.StdOut.Write statusOk&"Sleep time: "&sl&"ms"
Script requires one parameter <seep time in milliseconds>
thanke you
after try
now work fine !!!!
tks very much!
now work fine !!!!
tks very much!
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact: