| View previous topic :: View next topic |
| Author |
Message |
bostamy
Joined: 05 Nov 2009 Posts: 2
|
Posted: Fri Nov 06, 2009 12:01 am Post subject: Help getting started |
|
|
I am trying to get started writing my own script (i eventually want to get the project to the point of using zones with the GPIO) but I am trying something simple. I have a flash card with just a red,blue,and green .bmp image and a simple script I wrote (see below). I save the script in a file 'autoplay.brs' however it doesn't seem to be working since it doesn't toggle between the blue and green images as I expect (it cycles through all three). Can anyone please give me some advice about getting started getting this script to work?
sub main()
debug = true
v=CreateObject("roVideoMode")
v.SetMode("1920x1080x60i")
i1=CreateObject("roImagePlayer")
i1.SetDefaultMode(0)
while true
i1.DisplayFile("blue.bmp")
sleep(1000)
i1.DisplayFile("green.bmp")
sleep(1000)
end while
end sub |
|
| Back to top |
|
 |
RokuLyndon
Joined: 07 Nov 2006 Posts: 2810
|
Posted: Fri Nov 06, 2009 8:54 pm Post subject: |
|
|
The file should be called autorun.brs.
And, if you're not actually calling functions, you can drop the sub main().
debug = true
v=CreateObject("roVideoMode")
v.SetMode("1920x1080x60i")
i1=CreateObject("roImagePlayer")
i1.SetDefaultMode(0)
while true
i1.DisplayFile("blue.bmp")
sleep(1000)
i1.DisplayFile("green.bmp")
sleep(1000)
end while _________________ Lyndon
Roku Customer Care |
|
| Back to top |
|
 |
bostamy
Joined: 05 Nov 2009 Posts: 2
|
Posted: Fri Nov 06, 2009 9:21 pm Post subject: |
|
|
| Thanks for the help...i got confused because on your web page (http://www.brightsign.biz/implement.php) under implement is says just name the script file autoplay.bas |
|
| Back to top |
|
 |
RokuLyndon
Joined: 07 Nov 2006 Posts: 2810
|
Posted: Sat Nov 07, 2009 12:12 am Post subject: |
|
|
I will have that fixed. _________________ Lyndon
Roku Customer Care |
|
| Back to top |
|
 |
|