Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
hugetv
Level 7

display a message every X seconds

as I can show a message every 20 seconds
Our system http://www.rokumanager.com
0 Kudos
8 Replies
Komag
Level 9

Re: display a message every X seconds

In your main loop, have a timer that, when over 20 seconds (or 20000 milliseconds), calls the text function and resets itself to 0.

clock = CreateObject("roTimespan")
clock.Mark()

(WITHIN LOOP)
IF clock.TotalSeconds() >= 20
showMyText()
clock.Mark()
END IF
0 Kudos
hugetv
Level 7

Re: display a message every X seconds

the code within Main() but does not work

sub Main()
timer = CreateObject("roTimespan")
timer.Mark()
print timer.TotalSeconds()
m.RegistryCache = CreateObject("roAssociativeArray")
categories = LoadConfig()
ShowPosterScreen(categories, "Menu", "", 0, 0)
if timer.TotalSeconds() >= 20
showMyText()
timer.Mark()
end if
end sub
Our system http://www.rokumanager.com
0 Kudos
Komag
Level 9

Re: display a message every X seconds

It has to be within a repeating loop, such as :
sub Main()
timer = CreateObject("roTimespan")
timer.Mark()
print timer.TotalSeconds()
m.RegistryCache = CreateObject("roAssociativeArray")
categories = LoadConfig()
ShowPosterScreen(categories, "Menu", "", 0, 0)
WHILE TRUE
if timer.TotalSeconds() >= 20
showMyText()
timer.Mark()
end if
END WHILE
end sub[/quote]
0 Kudos
hugetv
Level 7

Re: display a message every X seconds

but it looks like I have not run me showExpirationScreen ()


sub Main()
timer = CreateObject("roTimespan")
timer.Mark()
m.RegistryCache = CreateObject("roAssociativeArray")

'checks if the account exists
if ValidateLinkingDevice(GetDeviceESN()) = true

categories = LoadConfig()
ShowPosterScreen(categories, "Menu", "", 0, 0)

while true
if timer.TotalSeconds() >= 20
showExpirationScreen()
timer.mark()
end if
end while
else
ShowLinkScreen()
endif
end sub
Our system http://www.rokumanager.com
0 Kudos
Komag
Level 9

Re: display a message every X seconds

I'm not sure how you will specifically work it in, only the general concept. I'm not familiar with most of the regular video channel stuff like ShowPosterScreen() or showExpirationScreen()
0 Kudos
hugetv
Level 7

Re: display a message every X seconds

ok thank you very much achieved already solve
Our system http://www.rokumanager.com
0 Kudos
hugetv
Level 7

Re: display a message every X seconds

I use this code to disable the other

while true
if timer.TotalSeconds() >= 20
showExpirationScreen()
timer.mark()
end if
end while

me de
Our system http://www.rokumanager.com
0 Kudos
hugetv
Level 7

Re: display a message every X seconds

To put this script works but I disables all other functions

while true
if timer.TotalSeconds() >= 20
showExpirationScreen()
timer.mark()
end if
end while
Our system http://www.rokumanager.com
0 Kudos