JMRI is...

Scripting

Information on writing scripts to control JMRI in more detail:

Tools

The general objects available to control your layout.

Layout Automation

Other tools for JMRI Automation:

JMRI Layout Automation

JMRI applications provide a large number of ways of automating your layout, ranging from simple fill-in forms to full-fledged scripting and programming capabilities. These include:

Signaling
JMRI provides signaling logic from simple to prototypical, which can be used to drive your signals in many applications.
Routes
A simple form of automation is to define Routes, which allow you to simplify the control of your turnouts.
Dispatcher
Dispatcher lets you dispatch and (automatically) run trains on layouts with Layout Editor Panels.
Warrants
Warrants let you automatically run trains on layouts with Control Panel Editor Panels.
Logix
Using JMRI Logix, you can specify actions to happen when various conditions occur on the layout.
Scripting
JMRI provides a very powerful scripting tool. Based on a real programming language, it gives you access to all the JMRI capabilities.
Writing your own code in Java
The JMRI libraries greatly simplify writing a program to make your layout do exactly what you want.