Using the Script Editor

Revision as of 15:08, 9 August 2014 by Rueden (talk | contribs) (Use key template)
Script Editor (ImageJ)
Author Johannes Schindelin, Sumit Dubey (Google Summer of Code 2009)
Maintainer Johannes Schindelin
Source on GitHub
Initial release 11 Sep 2008
Development status active


The script editor is an invaluable help when writing scripts in any of ImageJ's supported languages.

Starting the editor

To get started, start up the script editor:


There is also the keyboard shortcut { (open curly bracket) to open the editor.

Choosing a language

Then choose a language from the language menu:


Now you can write your script. In this tutorial, Jython was chosen as scripting language, but the process is really the same for all scripting languages.


Running the script

Once you are satisfied with the script, run it. This does not require saving, but of course you should save your script later when it works.


Note that while the script is running, the window title shows the tell-tale (Running).

You can use all of ImageJ's classes right away. Here is an example that shows a dialog where the user can input a number. For details how to write dialogs in the different scripting languages, see Scripting comparisons


Further reading

There are introductions into the following supported languages: ImageJ Macro Language, Beanshell, Javascript, JRuby, Jython, and Clojure (see also Scripting Help).