Getting Started

Scripting javascript

OLIVER includes a javascript enterpreter which can execute scripts that perform functions that would normally be performed manually by clicking buttons. Although learning this scripting language will take some effort, this technique offers several advantages:

  • Scripts can allow you to perform a long list of actions quickly, without having to click through so many menus and buttons in the OLIVER user interface
  • You can save your scripts to share them or just repeat your own analysis with perfect consistency.
  • Often, new or advanced features in OLIVER will only be available through scripting. This allows the developers to test new functions before they design a convenient user interface.

Introduction to Javascript

Javascript is an interpreted, object-oriented programming language that it is typically used for dynamic content on websites. OLIVER, which is written in Java, takes advantage of Java's built-in javascript interpreter to support its scripting feature.

Before looking at any example scripts, you should get familiar with the syntax of javascript code. w3schools.com has some excellent resources for learning javascript.

The Script Editor

In OLIVER, scripts are typically run using the Script Editor, which is launched by clicking "Scripting", "Script Editor". The Script Editor includes a "File" menu that can be used to save or load scripts. The "run" button at the bottom is used to run the script. When scripts are run the may add, remove, or transform elements in the OLIVER workspace.

Now that you know the very basics, the best way to learn OLIVER-specific scripting functions is by example. So check out the example workflows, which detail some analysis steps using both the user interface and scripts.

the scripting menu and script editor with a script.