INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Accessing files with JScript (with automation SDK)  (Read 1878 times)

PhDSM

  • Regular Member
  • World Citizen
  • ***
  • Posts: 193
Accessing files with JScript (with automation SDK)
« 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
Logged

ncriss1234

  • Regular Member
  • Recent member
  • *
  • Posts: 9
  • Fight for your digital rights--www.eff .org
Re: Accessing files with JScript (with automation
« Reply #1 on: November 08, 2002, 07:43:24 pm »

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.
Logged
* There's a party in my head--and I hope it never stops.  -D. Byrne

Soundman

  • Regular Member
  • World Citizen
  • ***
  • Posts: 155
  • Go Music!
How to Writing a plug-in using JScript
« Reply #2 on: December 02, 2002, 06:14:29 pm »

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!
Logged

ncriss1234

  • Regular Member
  • Recent member
  • *
  • Posts: 9
  • Fight for your digital rights--www.eff .org
Re: Accessing files with JScript (with automation
« Reply #3 on: December 06, 2002, 03:05:30 pm »

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.
Logged
* There's a party in my head--and I hope it never stops.  -D. Byrne

PhDSM

  • Regular Member
  • World Citizen
  • ***
  • Posts: 193
Re: Accessing files with JScript (with automation
« Reply #4 on: December 13, 2002, 04:04:15 am »

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
Logged
Pages: [1]   Go Up