Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WScript.Sleep - object not supported??? 1

Status
Not open for further replies.

Oxymoron

Technical User
Dec 17, 2000
168
GB
Hi, I posted a message a week ago about a delay function, and someone very kindly offered the folowing script. Howvere when I run it, I get the error message:
"Object doesn't support this property or method: 'WScript.Sleep'"

Here is the script, can anyone help??
any offers would be appreciated!
cheers
JoE
 
oops, god that must appear intellignt. Maybe why this script doesn't work...
here ya go :p
-----------------------------------------------------------Const gstrTitle = "The pause that refreshes!"
Dim wshShell, intDelay

set wshShell = WScript.CreateObject("WScript.Shell")
intDelay = InputBox("Enter seconds to wait before " _
& "calculator pops up.", _
gstrTitle)
WScript.Sleep intDelay * 1000
WshShell.Run "calc"
-----------------------------------------------------------

Hope y'all find that more useful.
thanx
JoE
 


Oxy,

Wscript.sleep is not support in an ASP page. You have to use a timer function "setTimeout".


Fengshui1998


 
Thanx for the suggestion, but it's not for an ASP page.
It's jut for a .vbs script file.

any further help would be great! :p
JoE
 
Oxy,

Earlier versions of VBScript did not support Wscript.Sleep. I had the same problem. I suggest you get the latest off Microsoft's web site.

Fengshui1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top