PDA

View Full Version : is there someway to get info about time, date and user trough MEL!!


pigbelly
07-07-2003, 02:25 PM
is there someway to get info about time, date and user trough MEL!!

/Tommie

klod
07-07-2003, 02:49 PM
hi,

yes, I get them with the system command:

string $time = system("time /t");
string $date = system("date /t");

klod

pigbelly
07-07-2003, 03:21 PM
Great!!!
Thanks!!!!


can you get info about the user?
I mean the computer that executed the mel script??

/Tommie

klod
07-07-2003, 03:46 PM
yes. same method:

string $computerName = system("set COMPUTERNAME");
$computerName = `substitute "COMPUTERNAME=" $computerName ""`;

thiw works with windows only, of course :)

pigbelly
07-07-2003, 05:04 PM
Yes!!!

Thank you for living!!!

/Tommie

nendo
07-18-2003, 10:43 AM
Cool !
I was just reading past threads and wondering how to find the user name !
:)

alexx
07-18-2003, 11:28 AM
you can use systems envrionment variables for user name and computer name..

(windows):

getenv ("USERNAME");
getenv ("COMPUTERNAME");

cheers

alexx

CGTalk Moderation
01-15-2006, 02:00 PM
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.