quote:
Originally posted by Xocide
Hi, I'm trying to make a script that reads from a text file that the script created itself, However whenever it reads a file all I get is:
Here is the code I'm using to read it:
code:
var thetxtFile = '';
var Message = '';
var TheFile = 'test';
FSO = new ActiveXObject("Scripting.FileSystemObject");
if (FSO.FileExists(MsgPlus.ScriptFilesPath + "\\txtFiles\\" + TheFile + ".txt")) {
thetxtFile = FSO.OpenTextFile(MsgPlus.ScriptFilesPath + "\\txtFiles\\" + TheFile + ".txt", 1);
Message = thetxtFile.ReadAll();
Debug.Trace(Message);
}
the file test.txt contains "test" in it.
Hey Welcome on this forum!Please search before post next time
...To solve your problem see
TheGuRuSupremacy answer to How to read a text file