system time

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  12 December 2006
system time

is there a way to get the windows time " clock " through maxscript ?

i was thinking of making a script for an analouge watch , not depending on length or manual
keys in the scene ...

i did the whole thing pretty easy with just wiring , but i realized that any modification in the
scene time or scale will ruin the whole thing

  12 December 2006

You can call timeStamp() returning the number of milliseconds since 00:00 hours that day :

millisecs = timeStamp()
  12 December 2006

Mabe this can help you:

1)teake windows time:


2)make some function:

fn theTime part =
local arr = filterString LocalTime "./ :"
case part of -- in other countries is diferent numbers (try you self)
#year :arr[3]
#month :arr[2]
#day :arr[1]
#hour :arr[4]

3)and use a "max timer" for refresh every second or minute:

  12 December 2006
The Local Time string is country-specific!

In the US, the MONTH is the FIRST element of the date, followed by the DAY and then YEAR, so your code would be wrong as it assumes the day as the first element!

From what I could test so far, the getFileCreateDate() method does not appear to be affected by the Regional Settings, but it might vary between Windows Versions - I would love some feedback from different countries to verify that as I could not find a definitive answer on Microsoft's support pages.

What do you get when you evaluate the code

getFileCreateDate (GetDir #maxroot + "\\3dsmax.exe")

On my machine running WinXP Pro 32bit, I am getting "9/29/2006 1:30:23 PM" regardless of Regional Settings. If you see something else, please post here as I am working on some code that depends on this!
  12 December 2006

Results in Czech Republic:

getFileCreateDate (GetDir #maxroot + "\\3dsmax.exe")
will return : "12/4/2006 9:31:02 AM"

code: filterString LocalTime "./ :"
will return : #("12", "19", "2006", "2", "59", "24", "PM")

god day to you
  12 December 2006
thanks guys
you are always great , always give help to others , " yupech , MerlinEl , BOBO " i thank you for your help

as for BOBO

i get this

getFileCreateDate (GetDir #maxroot + "\\3dsmax.exe")

"4/18/2006 5:16:28 PM"


"12/20/2006 2:55:06 AM"

my country setting is egypt +2 GMT

and my time is right on my PC !

-irrelevant subject " for BOBO , did the treematograph stop for good ? "
  12 December 2006
Quote: -irrelevant subject " for BOBO , did the treematograph stop for good ? "

Yes, I stopped working on it as soon as Marsel started working on his Schematic Material Editor. Then he stopped because it looked impossible to get a working product without serious code fixes from Autodesk. Now we both wait for the Max programmers to make those internal changes and get their version of the editor out someday (which we hope to have inspired

You must admit TMG wasn't really useful, more of a gimmick and a reminder that we need something like that...
  12 December 2006
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 01:50 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.