[Jslib] Basic question on use/installation of JSLIB

Sudhakar Chandra thaths at openscroll.org
Mon Nov 3 13:48:11 EST 2003

[Caution: I am a new comer to JSLib myself]

On 11/03/03 12:47, Scott Bennyhoff wrote:
> First, can JSLIB work in conjunction with this other extension to
> give it the ability to have file I/O?  I have seen code examples on
> this site for JSLIB, but they all seem to be written for XUL, or at
> least a part is.

Sure, JSLib can work with other extenstions to give you the ability you 
seek.  If I am not mistaken, Macro Editor is itself a XUL application, 

> I have tried installing the JSLIB.JAR production install to work with
> Firebird.  Based on the installation instructions, I was able to view
> the JSLIB splash screen (using the URL chrome://jslib/content/).  I
> have also extracted the files out of the installed JAR file, so all
> the files are now visible on my computer.
> After this I have tried using the macro editor to load the I/O files,
> with no luck.  Here is a basic example I have done:
> alert('Start of Macro 6');
> load('chrome/jslib/jslib.js');

load() is not a core JS function/method.  What you need to do is to make 
macroeditor itself start using jslib.  To do this you need to follow the 
following steps:

1. Locate where macroeditor.jar is installed on your system.
2. Copy it to some other directory and unzip it.
3. You will get two subdirectories content and x_locale.
4. Go into content/macroeditor/
5. Edit macroeditor.xul and change the following lines:

   <script type="application/x-javascript" src="macrosettings.js"/>
   <script type="application/x-javascript" src="macroeditor.js"/>


   <script type="application/x-javascript" src="macrosettings.js"/>
   <script type="application/x-javascript" src="macroeditor.js"/>
   <script type="application/x-javascript" src="chrome://jslib.js">

6. Go back to the directory you were in in step '3'.
7. Zip up content and x_locale into a file macroeditor.zip
8. Rename macroeditor.zip into macroeditor.jar
9. Copy the jar into where you first found it overwriting the existing jar.
10. Restart your browser.

Now you the following should work.

> alert('jslib has loaded successfully!');

Homer: I'm sick of this Tarzan movie
Lisa: Dad!  This is a documentary on the homeless.
Slacker At Large                            http://openscroll.org/
Key fingerprint = 8A 84 2E 67 10 9A 64 03  24 38 B6 AB 1B 6E 8C E4

More information about the Jslib mailing list