The approach has been kept simple, but allows tremendous flexibility, in addition to the external text file, there are two parts to using external data from a Data Source file.
First, less look at the format of the external text file, for example: station.txt
It needs a line that defines the data section like this:
[Data]
After that line, any number of chunks of text can be defined in the form:
chunkname=text
For example:
Train=ICE 1634
ArrivalTime=12:23
Origin=Düsseldorf
Data Source system command
There is a system command that tells Sequencer the name of the external file that contains the text you wish to use. The named file will be in effect until a different Data Source command is used.Example:
Data Source: Station.txt
If no path is specified, Sequencer will look for the file in the same folder as the current script file.
Text macro to insert the stored data wherever needed
Wherever you wish to use the data from the external file, use this format:\<chunkname>
For example:
\<Train>
used with the sample file above will use the text: ICE 1634
Forcing the length
When inserting external text, you can force the text to be a specific length. This is important when putting data onto animated rows where you want to maintain neat columns. To specify the length append a pipe character (|) and the number of characters to the chunkname, for example:
\<Train|8>
Will pad or trim the train text to be 8 characters long.
Sample files
A pair of sample files demonstrate the use of this feature. Look for the sample files: Scripts\Samples\BigScreen\Hamburg.ini (open in Sequencer)
Scripts\Samples\BigScreen\Hamburg.txt (open with text editor)
Limitations
- The Windows function used to read the data source drops leading spaces from the data. If you need leading spaces, use non-breaking space characters. Press and hold Alt and type 0160 on the numeric keypad to insert a non-breaking space.
- The size of the text file is limited to 64K (but you can use as many files as you like)
- The encoding of the file is expected to be Windows 1252 (not UTF-8)