alexboyer
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2014
03:23 PM
Timed event within roSpringboardScreen
Hello,
I was wondering if there was a way to add a timed event to fire every 10 seconds or so. For example, if you're sitting on the springboard screen, ever 10 seconds the star rating could get checked or something. Is that possible?
Thanks!
I was wondering if there was a way to add a timed event to fire every 10 seconds or so. For example, if you're sitting on the springboard screen, ever 10 seconds the star rating could get checked or something. Is that possible?
Thanks!
5 REPLIES 5


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2014
03:39 PM
Re: Timed event within roSpringboardScreen

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2014
03:43 PM
Re: Timed event within roSpringboardScreen
Yes. You could use msg=wait(600000,port) or you could set up a timer:
timer=createobject("roTimeSpan")
timer.mark()
While True
msg=port.getmessage()
if timer.totalseconds() > 600 then
content.starRating=checkStarRating()
timer.mark()
screen.setcontent(content)
end if
if type(msg)="roSpringboardScreenEvent" then
if msg.isbuttonPressed() then
if msg.getindex() = 0 then
playContent(content)
else if
...
alexboyer
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2014
04:07 PM
Re: Timed event within roSpringboardScreen
Ah so you can check for multiple event types within the same while loop? Nice. Thanks!

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2014
04:53 PM
Re: Timed event within roSpringboardScreen
Yes. There may be some instances where it works better to use a separate port and if/then statement, specifically if you have an roScreen and async roURLTransfers, probably best if they are each on their own port.
- Joel
- Joel
alexboyer
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2014
06:42 PM
Re: Timed event within roSpringboardScreen
Wanted to let you know that suggestion worked very well. Thanks Joel!