Script Central - ScriptsTab

For viewing and editing train scripts, master script, script notes, and interactive command box.  See also Script Central Tabs.

Script Notes

Script notes are blocks of text you (the script author) can add to Script Central.  You might use these to give instructions for a user of your script, or to provide background info about it, or to jot notes to yourself about what's going on in the scripts.  You can add one or more of these to the first tab of Script Central, edit as desired, and then bring up whenever useful.

Interactive Command Box

In the Scripts tab you may create a special type of window called the interactive command box (ICB).  This starts as a blank space (with a comment at the top) and acts as a sort of scratch pad.  Enter a script command, then press Return -- the command executes immediately.  You may enter a new line or edit an existing one; in either case, when you position the cursor at the end and press Return, the line is executed.

There are some special considerations when executing script commands one by one; for information, see Script Command Prompt.

Contents of the ICB are saved with the layout, so you can go back and reuse lines entered in an earlier session.  There is only one ICB; once you have created one, the command is dimmed so you cannot create another.

List contents:

ID

Unique program-assigned id for each row.

Script

For train script: script name and owning train; otherwise, item type ("master" or "notes").

First Line

First line of script or note.

Actions:

Click list item

Selects item (script or note) and displays it in the text window.

Double-click row

For train or master script: brings up Script Editor for editing and viewing script.  For note: does nothing; editing is done here.

Right-click row Brings up context menu, commands as listed below.

Text window

Text is editable.  Text is in code style: fixed-size font, no wrap.  Changes are saved on clicking OK or Apply or on changing tabs.

Context menu:

Edit in Script Editor

Brings up Script Editor for editing and viewing train or master script; for a note, editing is done in this tab.

Delete

Deletes item and removes from the list.  For a train script, this removes the script from the train.

Copy

Copies selected row(s) to Windows Clipboard as tab-delimited text

Select All

Selects all rows for delete or copy

Enabled Master script only: check to enable automatic run on open, uncheck to disable.

Refresh

Rebuilds list; sometimes needed if changes have been made externally.

Add Note Creates a new, empty note and selects it so you are ready to enter text into it.  See Script Notes.
Add Master Script Creates an empty master script if the layout does not have one.  Dimmed if master script already exists.
Add Command Box Creates an Interactive Command Box -- a window for entering script commands with immediate execution.  See ICB above.
Restart Master Script Reruns the master script if the layout has one.  This command does not do a full rewind or change any train positions, it just restarts the master script at the first line.