Shoutbox

[help] read text file - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [help] read text file (/showthread.php?tid=64822)

[help] read text file by phish on 08-12-2006 at 01:30 PM

well i wanted to read a text file so i use the following code

code:
function read() {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var path = "C:\TEST.TXT";
var file = fso.GetFile(path);
fH = file.OpenAsTextStream(1, -2);
//...
//some other codes
//...
fH.Close();
}
but it doesn't work,
anyone helps to solve? thanks a lot
RE: [help] read text file by matty on 08-12-2006 at 01:39 PM

Your path has to have double \'s so

code:
var path = 'C:\\TEST.TXT';

RE: [help] read text file by phish on 08-12-2006 at 01:41 PM

yeah~~ it works, thanks a lot.~