Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Timer countdown

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,63401
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Timer countdown
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Timer countdown - 8/12/2008 9:29:38 PM   
  durbslaw

 

Posts: 2
Score: 0
Joined: 8/12/2008
Status: offline
Hi People, I would certainly appreciate all help with the following code, i am attempting to output a 30 second timer.

Dim i, interval
i=30
for i= 30 to 1 step -1
if i=0 then wscript.quit
wscript.echo i
next
wscript.quit
 
 
Post #: 1
 
 RE: Timer countdown - 8/12/2008 10:41:54 PM   
  TomRiddle


Posts: 191
Score: 4
Joined: 2/7/2008
Status: offline
Hi durbslaw,

wscript.echo pauses the script when run from wscript.

I added a bit of code on yours to force it to run in cscript console window
I also added a chr(7) echo which is a beep and a 995 milisecond sleep between beeps.

You could try getting rid of the beep and changing the sleep to 1000 milliseconds(1 second).

Personally I would prefer do it in a HTA with a set.interval timer updating display



      

(in reply to durbslaw)
 
 
Post #: 2
 
 RE: Timer countdown - 8/13/2008 12:21:45 AM   
  durbslaw

 

Posts: 2
Score: 0
Joined: 8/12/2008
Status: offline
Thanks Dude!!!, I will give it a shot...

(in reply to TomRiddle)
 
 
Post #: 3
 
 RE: Timer countdown - 8/14/2008 1:15:47 PM   
  ploosie

 

Posts: 45
Score: 0
Joined: 3/2/2008
Status: offline
Try this:  (It will display a counter for 30 seconds and close IExplore.exe - you can remove this part if you want)



      

(in reply to durbslaw)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Timer countdown Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts