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

General Tools

The general objects available to control your layout.

JMRI: AppleScript

On Mac OS X, you can use AppleScript to with JMRI. There are two ways to do this: Together, these simplify the connection between JMRI and the rest of your Mac, so that they can work together easily.

Operating Your Mac from JMRI via an AppleScript

You can write AppleScript commands and programs (scripts) within JMRI jython scripts, and then invoke them to have your Mac perform functions outside JMRI. An example of this is in the AppleScript.py sample script distributed with JMRI. It executes a very simple AppleScript:
  tell application "Finder"
    make new folder at desktop
  end tell
To do this, it has to The sample script shows how to do this, and can easily form the basis for running your own AppleScripts from within JMRI.

Controlling JMRI via an AppleScript

This section needs a lot of work; in the meantime, try
osascript -e 'tell application "DecoderPro" to get its |user.name|'
and look at the Apple doc page.

Also, search for "AppleScript" and "System Events" on this page.

Note the need to set accessibility, mentioned on this page. This is done on the Universal Access pane of System Preferences (System row, near the bottom), represented by this checkbox at the bottom:

  [ ] Enable access for assistive devices

See the sample file jython/applescript/sampleAppleScript.scpt

http://lists.apple.com/archives/java-dev/2005/May/msg00170.html

AppleScript Information

For more information on AppleScripts, including how to write and debug them, please see: And, of course, a Google search will turn up lots of interesting resources.