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.
Video Control Script: UDP & Serial 4/01/15 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.
Cleans out Recovery script - Deletes the Network Registry 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. It also clears network settings and any touchscreen calibration information in the registry.
3 Zones to 1 and backThis 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.
Loop any video Script Loops any number of videos on the card indefinitely. The videomode setting is at the top.
Synchronize 1 Video over GPIO 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.
Select an Audio file, blink led during playback 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.
Installs custom script into memory 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.
Set Date & TimeUse to set date and time manually on any player with a real time clock.
Factory Reset & CopyThis script resets the unit to factory defaults, deletes itself, then renames a file "autorun-next" to "autorun.brs", and then reboots.
Format SD & CopyThis script formats the sd card, then copies contents of the setup folder to the sd card. You can run it from a usb stick. You can change the formatdrive command from SD to "sd2" (internal microsd) or "ssd" or ssd drive in 4k units.