BrightSign HD2000 User's Guide Page 37

  • Download
  • Add to my manuals
  • Print
  • Page
    / 57
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 36
37
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
roTouchScreen object. To create an object in a script, the CreateObject() function is
used.
Refer to the following two manuals when writing scripts:
Roku BrightScript Reference -- this describes the actual scripting language
Roku Object Reference -- this describes the Roku Objects, such as
“roVideoPlayer”
Examples
A good way to learn BrightScript is to look at or modify existing scripts. You can find
links to example scripts at www.rokulabs.com/brightsign. The BrightSign Demo
“autorun.bas” is an example of a more sophisticated script.
You can also test BrightScript commands using the shell. Here is an example:
Welcome to the Roku Shell version 1.1.28 Release
Type '?' for help or 'help <command>' for help on <command>.
Roku> script
BrightScript Micro Debugger.
Enter any BrightScript statement, debug commands, or HELP.
BrightScript> print "hello"
hello
BrightScript> ? "hello"
hello
BrightScript> ?5+6
Page view 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 56 57

Comments to this Manuals

No comments