Roku BrightSign Guia do Utilizador Página 28

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 27
28
Scripts
BrightSign can be used without any knowledge of scripts to accomplish common goals
such as playing looping video or playing a slideshow (see the prior section in this manual
“Playing Media
”). It’s easy to control your digital signs or kiosks with a USB keyboard
or remote using a simple script. In addition, using CSV files you can create more
sophisticated signs. But by adding scripts, you can create the most interactive digital
signs or kiosks. For a fee, Roku can help you write scripts. Contact
for more information.
A script is a simple program that controls behaviors, like video playback, based on events
such as button presses. Scripts are also commonly used on PCs and Web Sites. For
example, Microsoft Office “macros” are often Basic Scripts. Adobe Flash apps often rely
on ActionScripts for their logic, and web pages are often driven by scripts written in
PHP, Perl, or JavaScript. If you don’t have scripting skills in-house, IT and Web
developers can be contracted to write scripts for you. Roku can also be contracted to
develop custom scripts and applications (contact [email protected]).
BrightSign has a built in scripting language (called BrightScript), similar in many ways to
the Basic found in Microsoft Office, or Windows XP “Windows Script Hosting”
VBScript.
Scripts can be as simple as one or two lines, and as complicated as thousands of lines.
Hello world
Here is how to create your first, very simple script
1. Using a text editor create a file called “hello.bas” with this line:
print “hello world”
2. Save “hello.bas” into the root directory of a CF card
3. Insert the CF card into BrightSign
4. Connect the serial port of BrightSign to you PC using a null modem cable, and
run hyperterminal (see the “Shell” section of this manual for more details).
5. Power up BrightSign.
6. Wait for it to boot, and for the “Roku>” shell prompt to appear
7. type: script /hello.bas
8. You should see “hello world” on your terminal window.
9. If you want the script to autorun upon boot, rename it “autorun.bas”
Roku Objects
As well as the BrightScript language itself, BrightSign relies upon a library of “Roku
Objects” to expose the hardware to the scripting language. Each Roku Object provides
access to certain capabilities. For example, there is a roVideoPlayer object and a
Vista de página 27
1 2 ... 23 24 25 26 27 28 29 30 31 32 33 ... 47 48

Comentários a estes Manuais

Sem comentários