JMRI is...

Scripting

Information on writing scripts to control JMRI in more detail:

Python

JMRI scripts are in Python, a popular general-purpose computer language

Tools

JMRI provides powerful tools for working with your layout.

Layout Automation

JMRI can be used to automate parts of your layout, from simply controlling a crossing gate to running trains in the background.

JMRI: Scripting

Any Java Scripting API (commonly refered to JSR-223) compliant scripting language can be added to JMRI, however, beyond JavaScript and Python are not directly supported in the default installation. If you want to add another scripting language, find a JSR-223 compliant interpreter and add it to the JMRI classpath as documented for your operating system (different operating systems have different launchers that are configured differently).

The following pages discuss scripting JMRI using the Jython version of Python:

  1. Getting started with simple scripts
  2. The language itself
  3. Examples
  4. Frequently asked questions
  5. Modifying the GUI with Jynstruments