<HTML> <HEAD> <TITLE>Simple Script</TITLE> </HEAD> <BODY BACKGROUND="watercolor.jpg"> <H1>The LED Script</H1> <H3>Syntax</H3> The script syntax for LED Sign V2.7 is 100% backward compatible with previous version of LED Sign. If your script ran on V2.5 it will run on V2.7. However, a V2.7 script may not run on V2.5. <BR> <BR> The syntax for the LED script is extremely simple. Each command must be on one line; they cannot be split onto multiple lines. Only one command can be on a line. A line that starts with a "!!" is a comment. Here is an example of a script: <PRE> !! 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 </PRE> <P> You can write a script with the same text editor that you use to write your HTML. Programs like Windows Notepad or Macintosh teachtext will work fine. <H3>The Options</H3> The different options for each function/transition are as follows: <UL> <LI>clear=true <LI>delay=<non-neg int> <LI>startspace=<non-neg int> <LI>endspace=<non-neg int> <LI>center=true <LI>times=<-1 | non-neg int> (-1 specifies infinity) <LI>pixels=<pos int> <LI>URL=<URL string> <LI>text=<string> </UL> <H3>The Functions/Transitions</H3> The different functions/transitions available in LED Sign are as follows: <UL> <LI>Appear - Cause text to appear on the sign <LI>Sleep - A delay <LI>ScrollUp - Scroll whatever is on the sign and the new message on going from bottom to top. <LI>ScrollDown - Scroll whatever is on the sign and the new message on going from top to bottom. <LI>ScrollLeft - Scroll whatever is on the sign and the new message on going from right to left. <LI>ScrollRight - Scroll whatever is on the sign and the new message on going from left to right. <LI>ScrollCenter - Scroll whatever is on the sign and the new message originating from the center. <LI>OverUp - same as ScrollUp except it overwrites whatever is on the sign. <LI>OverDown - same as ScrollDown except it overwrites whatever is on the sign. <LI>OverLeft - same as ScrollLeft except it overwrites whatever is on the sign. <LI>OverRight - same as ScrollRight except it overwrites whatever is on the sign. <LI>OverCenter - same as ScrollCenter except it overwrites whatever is on the sign. <LI>Pixel - Pixel in a new message <LI>Blink - Cause what ever is on the sign to blink <LI>Do - begin a "Repeat" block <LI>Repeat - end a "Repeat" block <LI>Reload - reload the script. Probably the most powerful feature of LED Sign. Whenever LED Sign gets the Reload command, it will reload the script over the URL. Useful if information is updated frequently (like stock quotes). An example use of reload: <PRE> Do [Display some messages/information] !! display those messages 5 times Repeat times=5 !! Now reload the script to get any possible changes Reload </PRE> </UL> <H3>Usage</H3> <UL> <LI>Appear [clear=true] [spacing] [URL=<URL string>] [text=<String>] <LI>Sleep [URL=<URL string>] [delay=<non-neg int>] (defaults to 1000) <LI>ScrollUp [clear=true] [URL=<URL string>] [delay=<non-neg int>] [spacing] [text=<String>] <LI>ScrollDown [clear=true] [URL=<URL string>] [delay=<non-neg int>] [spacing] [text=<String>] <LI>ScrollLeft [clear=true] [URL=<URL string>] [delay=<non-neg int>] [spacing] [text=<String>] <LI>ScrollRight [clear=true] [URL=<URL string>] [delay=<non-neg int>] [spacing] [text=<String>] <LI>ScrollCenter [clear=true] [URL=<URL string>] [delay=<non-neg int>] [spacing] [text=<String>] <LI>OverUp [clear=true] [URL=<URL string>] [delay=<non-neg int>] [spacing] [text=<String>] <LI>OverDown [clear=true] [URL=<URL string>] [delay=<non-neg int>] [spacing] [text=<String>] <LI>OverLeft [clear=true] [URL=<URL string>] [delay=<non-neg int>] [spacing] [text=<String>] <LI>OverRight [clear=true] [URL=<URL string>] [delay=<non-neg int>] [spacing] [text=<String>] <LI>OverCenter [clear=true] [URL=<URL string>] [delay=<non-neg int>] [spacing] [text=<String>] <LI>Pixel [clear=true] [URL=<URL string>] [delay=<non-neg int>] [pixels=<pos int>] [spacing] [text=<String>] <LI>Blink [delay=<non-neg int>] [URL=<URL string>] [times=<pos int>] <LI>Do (no parameters) <LI>Repeat times=<-1 | non-neg int> (the "times" parameter is required) <LI>Reload (no parameters) </UL> [spacing] = [center=true] | [startspace=<non-neg int>] [endspace=<non-neg int>] <P></P> <H3>Text Color</H3> <P> In LED Sign you can make the "on" LEDs eight different colors: <UL> <LI>Red (default) <LI>Orange <LI>Yellow <LI>Green <LI>Cyan <LI>Blue <LI>Purple <LI>White </UL> The way you specify a color is with a '\' followed by 'r', 'o', 'y', 'g', 'c', 'b', 'p', or 'w'. Everything after a color specification will be that color until another color is specified or the end of the line is reached. Each line starts out with the default of red. The text specified as: <PRE> text=This \ois \ya \gtest </PRE> 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. </P> <H3>Variable tags!!!</H3> <P> LED Sign also has the capability of displaying the current time/date. The tags are specified in the text just like the colors. Here are the time/date tags: <UL> <LI> tt - time <LI> dd - day abbreviated (eg Fri) <LI> DD - day (eg Friday) <LI> dn - day number 1-31 <LI> mm - month abbreviated (eg Aug) <LI> MM - month (eg August) <LI> mn - month number 1-12 <LI> yy - last two digits of the year (eg 95) <LI> YY - the year (eg 1995) </UL> The way the time/date tags are used is by preceding them by a backslash ('\') and enclosing them in brackets ({}). Here is an exaple: <PRE> ScrollLeft text=The current time is \{tt}. Today is \{dd} \{mm} \{dn}, \{YY}. </PRE> The line above in a script would print somthing like "The current time is 6:19 pm. Today is Sun Oct 29, 1995." on the sign. </P> <P> </P> <H3>URL connections!</H3> You can specify a URL to go to if the user clicks on LED Sign while it is displaying a certain message. To do this all you need to do is specify the URL on the function line in the script. Here's an example: <PRE> ScrollLeft URL=http://java.sun.com text=Java is cool! ScrollLeft URL=http://java.sun.com endspace=40 text=Click on this sign now to go to Sun! </PRE> The URL tag is also valid for the "Sleep" function. So you can be displaying a message and sleeping, and they can still click on the sign and have it take them to the URL. Example: <PRE> Appear center=true URL=http://www.sun.com text=Sun MicroSystems Sleep URL=http://www.sun.com delay=4000 !! Wait a long time to give them a chance to click! </PRE> <H3>Notes</H3> <P> The "text" parameter <B>must</B> be the last parameter, because the string after the "text=" 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!!! </P> <P> 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. </P> <P> If the "center=true" option is set, then the message will be centered on the sign <B>if</B> 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. </P> <P> 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 java console (under options menu in netscape); any error output is printed there. </P> <HR> <P></P> <ADDRESS> The LED Sign Java applet is written and Copyright 1995 by <A HREF="http://www.cs.hope.edu/~dbrown/">Darrick Brown</A> </ADDRESS> </BODY> </HTML>