DesktopX time question

Friday, April 29, 2005 by GCMaster | Discussion: New Users

Im making a clock type object in desktopX, but i dont know how to get the system time for the "Object_OnScriptEnter"
What i mean is, all i need to do is get the current time for the PC. thanks in advance.
thomassen
Reply #1 Friday, April 29, 2005 3:10 PM
Dim myTime
myTime = Now()


Now() Documenation

See the Windows Script Documentation for functions to manipulate the time returned. http://www.microsoft.com/downloads/details.aspx?FamilyId=C717D943-7E4B-4622-86EB-95A22B832CAA&displaylang=en
GCMaster
Reply #2 Friday, April 29, 2005 3:33 PM
I guess i forgot to mention, I have no idea how to use VBscript only Jscript!
JavaScout
Reply #3 Friday, April 29, 2005 3:48 PM
Jscript you use the Date Object

dateObj = new Date()

gets the current date and time

You can then use getHours(), getMinutes(), getSeconds() to get the time using the current locale

or getUTCHours() etc if you want the UTC time.

Link

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01