What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Help: How to write time to a txt file?

Help: How to write time to a txt file?
Author: Message:
alejoar
New Member
*


Posts: 2
Joined: Jul 2007
O.P. Help: How to write time to a txt file?
How do I write the current system time (hours, minutes and seconds) to a txt file I already created?

The only thing I found was this:
http://www.mpscripts.net/code.php?id=29

I think it has something to do, but I couldn't make anything :S

Sory if this is a very stupid question.. Im a newbie xD

Thanks!!

EDIT: Just to make things easier, I already now how to add a line to a file, I just want to know how to set a variable containing the current time.

This post was edited on 07-21-2007 at 06:31 AM by alejoar.
07-21-2007 06:29 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Help: How to write time to a txt file?
The question is what do you want to do with that saved time?
What is the purpose of it?
And what exactly do you mean by "time"?
And in what format? hh:mm:ss? or including the date? Long date? Short date?
etc...

It depends on the answers of those questions...

eg: If it is just for logging purposes you can simple add a line to the file like "Saterday, Juli 21st, 2007, 10:40pm".

But, if you're going to read the file again later on, it is very vital that you save the date/time in a format you can easly work with (preferable numerical) and which is not variable like the one above. Like "2007-07-21 22:40:43".

Since you know how to write something to a file, all you need to know are the functions and methods regarding time and dates.
These can be found in the JScript 5.6 Documentation:
Contents > JScript (Windows Script Technologies) > JScript Language Reference > JScript Objects (JScript 5.6) > Date Object (Jscript 5.6)

If you go there you'll see all the methods and properties you can use regarding dates and times, including examples.


PS:
quote:
Originally posted by alejoar
The only thing I found was this:
http://www.mpscripts.net/code.php?id=29
That's for something completely different.

This post was edited on 07-21-2007 at 08:54 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-21-2007 08:49 AM
Profile PM Find Quote Report
GNSPS
Junior Member
**

Avatar
Coding is man's best friend...

Posts: 40
32 / Male / Flag
Joined: Oct 2006
RE: Help: How to write time to a txt file?
I'd like to have that jscript documentation but in those microsoft downloads it says my windows is not genuine... and no... I'm not responsible for that I haven't installed this windows... So, what can I do? Can't anyone of you, very nice people, send that file? :P If you can't or don't want to bother I'll understand but please make some suggestions.. XD
07-21-2007 01:14 PM
Profile E-Mail PM Find Quote Report
alejoar
New Member
*


Posts: 2
Joined: Jul 2007
O.P. RE: Help: How to write time to a txt file?
Thanks!!!!

GNSPS, send me a pm with your email and Ill send it to you.

This post was edited on 07-21-2007 at 11:17 PM by alejoar.
07-21-2007 11:16 PM
Profile E-Mail PM Find Quote Report
scott2010_h
Full Member
***

Avatar

Posts: 187
Reputation: 10
32 / Male / Flag
Joined: Dec 2005
Status: Away
RE: Help: How to write time to a txt file?
or you could goto http://www.msgpluslive.net/scripts/browse/9/Tools...Script-Developers/
and get Windows Script Documentation 5.6
07-22-2007 08:21 AM
Profile E-Mail PM Web Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Help: How to write time to a txt file?
quote:
Originally posted by scott2010_h
or you could goto http://www.msgpluslive.net/scripts/browse/9/Tools...Script-Developers/
and get Windows Script Documentation 5.6
erm the download link redirects to Microsoft's Download Center which requires you to have a Genuine version of windows.
07-22-2007 08:47 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On