What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Creating a text file

Creating a text file
Author: Message:
hunter1577
New Member
*


Posts: 1
Joined: Dec 2008
O.P. Creating a text file
Er.. hi everybody
I just wanna know how i can create a text file anywherer in the pc with the Plus script and write something in it =]

Thanks
Hunter ~
12-04-2008 09:01 PM
Profile E-Mail PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
RE: Creating a text file
You can try using the FileSystem Object (function OpenTextFile or CreateTextFile).

example:
jscript code:
var fso = new ActiveXObject("Scripting.FileSystemObject");
fso.OpenTextFile("c:\test.txt" /*filename*/,2 /*mode;1=reading;2=writing;8=append*/, true /*create if non-existant*/);

To write something in it, use the Write or WriteLine function

This post was edited on 12-04-2008 at 09:12 PM by roflmao456.
[quote]
Ultimatess6
: What a noob mod
12-04-2008 09:11 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Creating a text file
For a beginner take a look at FileSystemObject and the function CreateTextFile.

quote:
Originally posted by roflmao456
example:
jscript code:
var fso = new ActiveXObject("Scripting.FileSystemObject");
fso.OpenTextFile("c:\test.txt" /*filename*/,2 /*mode;1=reading;2=writing;8=append*/, true /*create if non-existant*/);

It should be:
code:
var fso = new ActiveXObject("Scripting.FileSystemObject");
fso.OpenTextFile("c:\\test.txt" /*filename*/,2 /*mode;1=reading;2=writing;8=append*/, true /*create if non-existant*/);

This post was edited on 12-04-2008 at 09:31 PM by matty.
12-04-2008 09:16 PM
Profile E-Mail PM 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