The LED Script
Syntax
Each command must be on one line; they cannot be split onto multiple
lines. No more than one command can be on a line. A line that starts
with a "!!" is a comment. Here is an example of a script:
!! Just a simple script
Do
!! Move "Hello" up onto the sign
ScrollUp delay=30 center=true text=Hello
Sleep delay=1000
!! Scroll "This is a test" left onto the sign
ScrollLeft delay=30 startspace=20 endspace=80 text=This is a test
Sleep delay=300
!! Repeat infinitely
Repeat times=-1
The Options
The different options for each function/transition are as follows:
- clear=true
- delay=<non-neg int>
- startspace=<non-neg int>
- endspace=<non-neg int>
- center=true
- times=<-1 | non-neg int> (-1 specifies infinity)
- pixels=<pos int>
- text=<string>
The Functions/Transitions
The different functions/transitions available in
LED Sign are as follows:
- Appear - Cause text to appear on the sign
- Sleep - A delay
- ScrollUp - Scroll whatever is on the sign and the new message
on going from bottom to top.
- ScrollDown - Scroll whatever is on the sign and the new message
on going from top to bottom.
- ScrollLeft - Scroll whatever is on the sign and the new message
on going from right to left.
- ScrollRight - Scroll whatever is on the sign and the new
message on going from left to right.
- ScrollCenter - Scroll whatever is on the sign and the new
message originating from the center.
- OverUp - same as ScrollUp except it overwrites whatever is
on the sign.
- OverDown - same as ScrollDown except it overwrites whatever is
on the sign.
- OverLeft - same as ScrollLeft except it overwrites whatever is
on the sign.
- OverRight - same as ScrollRight except it overwrites whatever is
on the sign.
- OverCenter - same as ScrollCenter except it overwrites whatever is
on the sign.
- Pixel - Pixel in a new message
- Blink - Cause what ever is on the sign to blink
- Do - begin a "Repeat" block
- Repeat - end a "Repeat" block
- Reload - reload the script. Useful if information is updated
frequently (like stock quotes). Probably the most powerful feature
of LED Sign.
Usage
- Appear [clear=true] [spacing] [text=<String>]
- Sleep [delay=<non-neg int>] (defaults to 1000)
- ScrollUp [clear=true] [delay=<non-neg int>] [spacing]
[text=<String>]
- ScrollDown [clear=true] [delay=<non-neg int>] [spacing]
[text=<String>]
- ScrollLeft [clear=true] [delay=<non-neg int>] [spacing]
[text=<String>]
- ScrollRight [clear=true] [delay=<non-neg int>] [spacing]
[text=<String>]
- ScrollCenter [clear=true] [delay=<non-neg int>] [spacing]
[text=<String>]
- OverUp [clear=true] [delay=<non-neg int>] [spacing]
[text=<String>]
- OverDown [clear=true] [delay=<non-neg int>] [spacing]
[text=<String>]
- OverLeft [clear=true] [delay=<non-neg int>] [spacing]
[text=<String>]
- OverRight [clear=true] [delay=<non-neg int>] [spacing]
[text=<String>]
- OverCenter [clear=true] [delay=<non-neg int>] [spacing]
[text=<String>]
- Pixel [clear=true] [delay=<non-neg int>] [pixels=<pos int>]
[spacing] [text=<String>]
- Blink [delay=<non-neg int>] [times=<pos int>]
- Do (no parameters)
- Repeat times=<-1 | non-neg int> (the "times" parameter is required)
- Reload (no parameters)
[spacing] = [center=true] | [startspace=<non-neg int>]
[endspace=<non-neg int>]
Text Color
In LED Sign you can make the "on" LEDs six different colors:
- Red (default)
- Orange
- Yellow
- Green
- Blue
- Purple
The way you specify a color is with a '\' followed by 'r', 'o', 'y',
'g', 'b' or 'p'. Everything after a color specification will be that
color until another color is specified or the end of the message is
reached. The text specified as:
text=This \ois \ya \gtest
will appear on the sign as "This is a test" but with "Test" being red,
"is" being orange, "a" being yellow and "test" being green.
Notes
The "text" parameter must be the last parameter, because the
string after the "test=" is your message. This makes it easy to parse
(ie no nested quote problem) and easy for the user. What you see is
what you get!!!
If the "clear=true" parameter is given to one of the transitions, it will
cause the sign to clear (turn off LEDs) in the manner of the
transition. i.e. "ScrollDown clear=true" would clear the sign by
scrolling whatever is on the sign down off the sign.
If the "center=true" option is set, then the message will be centered
on the sign if it fits on the sign. It doesn't make sense to
center a message if it is longer than the sign. So, if your message
isn't centering, then it is probably too long. The "startspace" and
"endspace" parameters are ignored when the "center=true" parameter is
given.
The script is much like HTML in how it handles function tags and
parameters. It will ignore anything it does not recognize. However,
there are some ways to stop the applet. For example, "delay=fifty" is
incorrect because "delay" requires an integer and would thus cause
the applet to stop. There is some script error output. If you are
having trouble with LED Sign running your script, check your
.hotjava/weblog; any error output is printed there.
The LED Sign HotJava applet is written and Copyright 1995 by
Darrick Brown