PDA

View Full Version : Creating Log File & Grabbing the Time



safe05
08-28-07, 06:38 PM
Hello all,
I'm trying to find a way to make a little log file for my scripts with time stamps. Is there a way to grab the current system time (or even application time) when a user presses a button? I cold find anything in the command reference or on the forums here. Any ideas?

Thanks

E.

Svengali
08-28-07, 08:45 PM
Read about the ZBrushInfo command which gives you elapsed time in seconds from start of app.

Sven

safe05
08-28-07, 10:19 PM
That should do it. Thanks!

marcus_civis
08-29-07, 01:48 AM
One thing to mention is that if you are using [MemSaveToFile to write your log file then any value (including 0) for the 'overwrite?' argument will overwrite an existing file.

To NOT overwrite an existing file use this form:


[MemSaveToFile, My_MemBlock_Name, "logfile.txt"]

To overwrite an existing file:


[MemSaveToFile, My_MemBlock_Name, "logfile.txt", 1]

HTH,

safe05
08-30-07, 08:15 AM
Thanks for that, Marcus. Saved me some debugging time. :)