I have the following script to read a nowplaying text file generated by an amarok plugin. The file is created with the correct name and in the correct directory.
function ReadNowPlaying() {
var fname =
"c:\\program files\\mushclient\\worlds\\nowplaying.txt";
var fso = new ActiveXObject("Scripting.FileSystemObject");
var textStream = fso.OpenTextFile( fname, 1 );
while (!textStream.AtEndOfStream) {
var dataLine = textStream.ReadLine();
world.note(dataLine);
}
textStream.Close();
}
I've got the scripting dlls jscript.dll and scrrun.dll in the "/home/<username>/.wine/drive_c/windows/system/" directory.
The text file is being generated as: "/home/<username>/.wine/drive_c/program files/mushclient/worlds/nowplaying.txt"
I get an error message:
Error number: -2146827859
Event: Execution of line 1460 column 3
Description: Automation server can't create object
Called by: Immediate execution
when I try and invoke the script function with immediate execution, the line number points to the line "var fso = new ActiveXObject("Scripting.FileSystemObject");" but that line is copied straight out of the ms help file for the scripting host.
I'm guessing I need to tweak something to access this object under wine, can anyone suggest what I need to tweak?
Pompey1
function ReadNowPlaying() {
var fname =
"c:\\program files\\mushclient\\worlds\\nowplaying.txt";
var fso = new ActiveXObject("Scripting.FileSystemObject");
var textStream = fso.OpenTextFile( fname, 1 );
while (!textStream.AtEndOfStream) {
var dataLine = textStream.ReadLine();
world.note(dataLine);
}
textStream.Close();
}
I've got the scripting dlls jscript.dll and scrrun.dll in the "/home/<username>/.wine/drive_c/windows/system/" directory.
The text file is being generated as: "/home/<username>/.wine/drive_c/program files/mushclient/worlds/nowplaying.txt"
I get an error message:
Error number: -2146827859
Event: Execution of line 1460 column 3
Description: Automation server can't create object
Called by: Immediate execution
when I try and invoke the script function with immediate execution, the line number points to the line "var fso = new ActiveXObject("Scripting.FileSystemObject");" but that line is copied straight out of the ms help file for the scripting host.
I'm guessing I need to tweak something to access this object under wine, can anyone suggest what I need to tweak?
Pompey1