O.P. RE: [req] User command script
its a religious book that has no copywrite on it so dont worry about that. Its solely for my msn list rather than a global script release or anything like that. Thats why im solely requesting the coding only , and ill do the rest myself.
Edit: I was reading on patchous website the following:
// Reads the full contents of a text file to a variable
function ReadFile (file) {
var fileObj = fsObj.OpenTextFile(MsgPlus.ScriptFilesPath + '\\' + file, 1);
var contents = fileObj.ReadAll();
fileObj.Close();
return contents;
}
//Read line at position X from a text file. To read the second line of the file, use ReadLineFromFile('test.txt', 1); (the first line corresponds to index 0)
function ReadLineFromFile (file, line) {
var fileObj = fsObj.OpenTextFile(MsgPlus.ScriptFilesPath + '\\' + file, 1);
var lineResult = fileObj.ReadAll();
lineResult = lineResult.split('\r\n');
fileObj.Close();
return lineResult[line];
}
- using this - how would i make it so that if another user requested a line it would return the line to them, instead of just me typing the command?
This post was edited on 05-30-2007 at 03:15 PM by Gosan.
|