Roku Forums Forum Index Roku Forums
Your Digital Media Has Never Looked So Good
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help getting started

 
Post new topic   Reply to topic    Roku Forums Forum Index -> BrightSign General Discussion
View previous topic :: View next topic  
Author Message
bostamy



Joined: 05 Nov 2009
Posts: 2

PostPosted: Fri Nov 06, 2009 12:01 am    Post subject: Help getting started Reply with quote

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
View user's profile Send private message
RokuLyndon



Joined: 07 Nov 2006
Posts: 2810

PostPosted: Fri Nov 06, 2009 8:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
bostamy



Joined: 05 Nov 2009
Posts: 2

PostPosted: Fri Nov 06, 2009 9:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
RokuLyndon



Joined: 07 Nov 2006
Posts: 2810

PostPosted: Sat Nov 07, 2009 12:12 am    Post subject: Reply with quote

I will have that fixed.
_________________
Lyndon
Roku Customer Care
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Roku Forums Forum Index -> BrightSign General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group