Build Your Own

Build Your Own

How to Create an Extension for Kirix Strata

You can create an extension for Kirix Strata™ by packaging a script together with an XML file, called "info.xml." This XML file contains the information required to load and run the script as an extension in Strata.

Strata extensions are stored and distributed as ".kxt" files.  These are simply .zip files with a .kxt file extension.  To put together a new .kxt file, start by creating an empty .zip file and add your script files, info.xml and any other resources into it.  Finally, change the file extension from ".zip" to ".kxt".

In order for an extension to work, your .kxt file must contain at least two items:

  • info.xml - An XML file with the metadata for the extension.  See an example of this type of file below.
  • main.js - A JavaScript file that contains the code you want to run when the extension loads.

In addition to these two required files, you can package additional resources in the .kxt file to use with your extension, such as:

  • Additional JavaScript source files, which you can reference in "main.js" or other parts of your code.
  • A bitmap file to display a graphic in Strata's Extension Manager.
  • Other resource files that you would like to use, such as HTML templates, data files, etc.

After you've put together a .kxt file, you can add it to Strata by selecting Extensions from the Tools menu.  An Extension Manager will appear; click the Add Extensions button to add your extension to the list.  Going forward, every time Strata loads, it will automatically launch your extension and run the code you have in "main.js".

Putting Together a "Hello, World" Extension

To make a "Hello, world" extension, the first step is to create a script in Strata that displays the text "Hello, world".  Fortunately, this involves just a few steps and a single line of code:

  1. Click New in the File menu, and select Script from the set of options
  2. Add the following line to the new script:

    alert("Hello, world");
  3. Select Save from the File menu and then name the saved file "Hello_world"

At this point, you can press <Alt-Enter> to run this script; it should display an message box that says "Hello, world".  If this works properly, select Save As External from the File menu and save this file as "main.js" on your local drive.

The next step is to create an "info.xml" file for the extension.  To do this, open Notepad or another text editor and cut and paste the following text into it:

<?xml version="1.0">
    <name>Hello World</name>
     <author>Yours Truly</author>
     <description>Display a Hello World alert message.</description>

Next, save this file as "info.xml" in the same area where you put "main.js" (NOTE: if you use Notepad, be sure to change the "Save as type" option to "All Files", so that it saves as an XML file).

Finally, you just need to package everything together as a .kxt file:

  1. Create a .zip file on your local drive called "" 
  2. Add "main.js" and "info.xml" to ""
  3. Change the name of "" to "Hello_world.kxt"

The "Hello, world" extension is now complete.  To add this extension to Strata, select Extensions from the Tools menu, click Add Extensions and finally select the "Hello_world.kxt" file.

After adding "Hello_world.kxt" to the Extensions area in Strata, you can run it immediately by clicking the Start Now button.  Additionally, after you close Strata, the next time you open it, this extension will run automatically.  Of course, this gets old quickly, and so you can remove the extension from Strata by selecting Extensions from the Tools menu and clicking the Uninstall button for "Hello World".

Learn More

For further information, including a scripting overview, sample scripts and API documentation, please see the Developer Resources section, which includes a more detailed example on creating your own "Hello World" application .  In addition, you can use the Extension Wizard to package an extension, create sample script components and generate sample applications.  

Also, please feel free to contact us or post a message on our support forums if you have any questions about scripting or extensions; we're happy to help!

Developer's Guide

Check out our Developer's Guide to learn how to develop a new extension or edit an existing one.