INTERACT FORUM
Windows => Plug-in Development => Topic started by: PhDSM on November 07, 2002, 05:08:45 am
-
I've developped several JScript to manage data in MJ Database using the Metamorphis Scripts and Interface SDK.
I'm not a specialist in JScript and I'm locked ? now on how to access a file from the JScript (open, read, close).
What function should I use and where can I find documentation or example.
(I'm tryiong to write a script to automaticaly load Lyrics from a file named "name.txt".
Any ideas
Thanks :)
PhDSM
-
You need to use the COM object: Scripting.FileSystemObject
This is built-in to the OS so you already have it. You can find a complete reference at http://msdn.microsoft.com/scripting
I reccomend you download the latest and greatest Windows Scripting Host SDK. That will give you the best JScript engine as well as complete docs.
-
PhDSM,
I take it that you wrote a plug-in using JScript?? That means that you had to write a COM object DLL using JScript, right? Can you point me to where I can find information about how to do this?
Thanks!
-
While I've used JScript for a lot of different things, I have not written a plugin in that language.
JScript is "interpreted' using the MS Windows Scripting Host engine (formerly known as Active Scripting). To the best of my knowledge, there is no way to compile JScript down to any kind binary file, including COM DLLs.
The next friendliest language that can be used to make COM objects is Visual Basic. It's similar to VBScript but a little more structured. By far, the majority of COM objects are written using C++.
Sorry,
-N.
-
In fact I didn't wrote a full plug in in JScript, however I wrote Jscript to handle the MJ database for example I have script that swap Album and Comment, custom1 and custom2, copy Album in Custom1... also load lyrics from a file name "title.txt"...
To do it, I've develop a miniskin with buttons that launch JScript.
Rgds
PhDSM