posted this on February 22, 2010, 5:49 PM
This list isn't in any particular order, or are the scripts organized. I'm going to start adding simple script examples I've been asked about to this thread. There are several script examples in the object reference guide. In some cases, what I post here will be just sample code, not a fully functional script. To run any script posted, it needs to be named autorun.brs (for the compact models) or autorun.bas (for the HD600 and HD2000s) and should be in the root of the flash card. Scripts
[b]Video Control Script: UDP & Serial[/b]Readme9/13/11 This is a control script for playing back videos. It accepts commands over serial or UDP to play, stop, and loop a video. It also supports search and volume controls. The readme contains the list of commands. The unit automatically responds when a command is received, a different response for each command, and it also sends a response when a file has finished playing or each time it finishes playing a video if it's looping. If you're using an AMX, Crestron, or similar show controller and just want to be able to send a command and file name to the brightsign, this is one solution.
[b]Play All Videos, NTSC output[/b]3/31/11 This simple script will play all videos found on the flash card. It also sets the video mode to "ntsc-m". If you're using an HD810 or HD1010, you can connect the center component connect to an older display using composite cables. Latest versions of BrightAuthor don't require a script.
[b]Cleans out Recovery script - Deletes the Network Registry[/b] If you connect your Brightsign to Brightsign Network Manager, there's a recovery script stored in the registry. Once this recovery script is enabled, you can't startup a unit with a blank flash card or no flash card and see the firmware version on the screen. Also, with the recovery mode enabled, you can't use the autorun that's built into memory. This script deletes the networking registry and displays text onscreen when complete.
[b]3 Zones to 1 and back [/b] This is a simple demonstration script. It plays one video and two images together in a three zone layout. After 18 seconds, the image zones stop, and the video expands to full screen, and then back to three zones after another 6 seconds.
[b]Loop any video Script[/b] Loops any number of videos on the card indefinitely. The videomode setting is at the top.
[b]Synchronize 1 Video over GPIO[/b] This script plays one video in a loop, and synchronizes playback with one or more units connected to the gpio 0 output of the master. It assumes the video is named "video.ts" and that the slave is also listening on input zero.
[b]Select an Audio file, blink led during playback[/b] This script plays one of two mp3s when either button 0 or 1 is pressed. During playback, the script flashes an led connected to gpio 4 for audio 1 and for gpio 5 for audio 2. The led flashes on and off every 1/2 second.
[b]Installs custom script into memory[/b] This script will place a script named boot.brs into memory, replacing the default autorun.brs. You can put your own script into memory to execute on startup, or put a modified version of the existing autorun back into memory, with any changes you've made to it.
[b]Set Date & Time on HD810/HD1010[/b] This is actually a playlist using the older playlist format. Just edit the autoplay.bsp with any text editor and change the timezone and time to match the time you want to manually set. If your HD1010 is on the network, it will use the brightsign timeserver on the internet to set its date and time.
[b]Script runs, deletes and replaces itself with a different autorun.brs from a temp folder[/b] This script accepts just prints output to the serial port. It's just a simple test. It will run and delete itself. It will copy an autorun.brs from the /temp folder to the root, and then restart. For example, you could publish a project to your flash card and copy that autorun to the temp folder. Then, you can add a custom script that would run once, and then copy the correct autorun back into the root.