You can use the FileSystem ActiveXObject to open a text file, read from it and write to it.
code:
var Path = MsgPlus.ScriptFilesPath + "\\Stuff.txt"; //The path to the file to read / write to.
var IsUnicode = false; //Set this to true if you want to read / write in Unicode.
//Read the file
var FSO = new ActiveXObject("Scripting.FileSystemObject");
var File = FSO.GetFile(Path);
var TextStream = FSO.OpenAsTextStream(1, IsUnicode ? -1 : 0);
var Contents = TextStream.ReadAll();
TextStream.Close();
//Do something useful with Contents...
//Write the file
var Contents = "This is the new content of the file!";
var FSO = new ActiveXObject("Scripting.FileSystemObject");
var File = FSO.GetFile(Path);
var TextStream = FSO.OpenAsTextStream(2, IsUnicode ? -1 : 0);
TextStream.Write(Contents);
TextStream.Close();
Or, if you want to get really advanced, you could use the Windows API for this... but I doubt that as a beginner, you'd want to get on to something that complicated.
References:
FileSystemObject
TextStream object