Here are 2 untested options to get get you started.
js code:
function ReadLineFromFile(sFile, nLine) {
var f = new ActiveXObject("Scripting.FileSystemObject").OpenTextFile(sFile, 1 /* ForReading */);
while (--nLine > 0 && !f.AtEndOfStream) {
fso.ReadLine();
}
var s = fso.ReadLine();
f.Close();
return s;
}
js code:
function ReadLineFromFile(sFile, nLine) {
var f = new ActiveXObject("Scripting.FileSystemObject").OpenTextFile(sFile, 1 /* ForReading */);
var s = f.ReadAll();
f.Close()
var FileContents = s.split('\r\n');
return FileConents(nLine-1);
}