INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

sleep command

sleep command

(OP)
Hi,

I'm looking for help using the Sleep Method.  Can anyone show me an example of how to use it.  I want to pause a For loop for 12 seconds to make a slideshow.

RE: sleep command

WScript.Sleep(12000)

"... isn't sanity really just a one trick pony anyway?!  I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick

RE: sleep command

(OP)
Thanks for the WScript tip.  However I'm not familiar with it and have not used WScript.  WScript.Sleep(12000) does not work in VBscript, so do I have to download this WScript from Microsoft to the server to get this command to work.

Thanks, and I to enjoy the depths of insanity at times!

RE: sleep command

hmm wscript is part of the windows scripting host (object lib?) if your code is in a vbs file or wsf file then this will work. i guess if you are on a server then you are talking about ASP?

RE: sleep command

Yes, pausing within a web page is a completely different proposition all together. Is that what you are trying to do?

"... isn't sanity really just a one trick pony anyway?!  I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick

RE: sleep command

(OP)
Yes, I'm trying to build a slideshow on a Webpage, so I need this to pause on the server.  So I guess I should go to Microsoft and download the WSH, and it will work.  Does that sound correct to you?

RE: sleep command

The WSH is not your problem. Your problem stems from the fact that IE security will not let you create a WScript object.

"... isn't sanity really just a one trick pony anyway?!  I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick

RE: sleep command

>So I guess I should go to Microsoft and download the WSH, and it will work.  Does that sound correct to you?
No, you go for window.setTimeout() method of the dhtml page.

RE: sleep command

(OP)
Window.setTimeOut idea...  Thanks that was a good idea.  It works just fine.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close