Rail3D Scripting is a programming system built into Rail3D that allows you to extend and customise the program for specific simulations. Examples include extending the signal functionality, tweaking train dynamics, automating timetabling and routing, and creating macros to automate repetitive tasks in layout construction.
There are lots more ideas, and we expect the scriptable parts of Rail3d to extend as people think up new ways to use them.
Nonetheless, scripting should be regarded as a topic for "advanced users" - it is very easy to mess up your layout completely with a small error in a script, so make lots of backups!
The complete scripting reference guide and a large range of examples can be found on the Rail3dWiki.