Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

I Am Looking For A VBScript For A Countdown Clock...


Recommended Posts

Posted

I wonder if someone can help?

 

I have been asked by our PE Department to place a countdown clock on student desktops. The target for the countdown is the Olympics in London later this year.

 

I had thought that I could incorporate it into a custom field in BGInfo but none of the scripts I am looking at seem to do the job.

 

Are there any VBScript wizards out there that could prepare a script suitable for use in a Custom Field in BGInfo?

 

Thanks.

Posted

Try this:

 

olympics=CDate("27/07/2012 00:00:00")
wscript.echo("It is " & DateDiff("d", Now(), olympics) & " days to the olmypics!")

 

Only basic, but can be modified easily. (Check date, think it's right one)

 

-Edit or do you wnat hours/seconds etc?

 

Steve

  • Thanks 1
Posted

Hi Steve. Your suggestion works as a standalone VBS script but gives an error when added to BGInfo:

 

http://img849.imageshack.us/img849/5052/bginfovberror.jpg

Posted
Hi Steve. Your suggestion works as a standalone VBS script but gives an error when added to BGInfo:

 

http://img849.imageshack.us/img849/5052/bginfovberror.jpg

 

 

Mmm seems bginfo does it silly, try removing the wscript and just using echo

 

Steve

  • Thanks 1
Posted (edited)
Try this:

 

olympics=CDate("27/07/2012 00:00:00")
wscript.echo("It is " & DateDiff("d", Now(), olympics) & " days to the olmypics!")

 

Only basic, but can be modified easily. (Check date, think it's right one)

 

-Edit or do you wnat hours/seconds etc?

 

Steve

 

Hours and seconds would be good!

 

Edit: Got it working now thanks to your earlier suggestion [remove wscript] Now if we can do hours and seconds...

Edited by 6Foot2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...