port = CreateObject("roMessagePort")
screen = CreateObject("roSpringboardScreen")
screen.SetMessagePort(port) ' instruct screen to send events to port
screen.Show()
while true
msg = wait(0, port) ' wait for a message
if type(msg) = "roSpringboardScreenEvent" then
if msg.isScreenClosed() then
return -1
elseif msg.isButtonPressed()
print "button pressed: ";msg.GetIndex()
else
' ignore other unknown or uninteresting roSpringBoardScreenEvents
endif
else
' ignore other events, not type roSpringboardScreenEvent
endif
end while
port = CreateObject("roMessagePort")
screen = CreateObject("roSpringboardScreen")
screen.SetMessagePort(port) ' instruct screen to send events to port
screen.Show()
while true
msg = wait(0, port) ' wait for a message
if type(msg) = "roSpringboardScreenEvent" then
if msg.isScreenClosed() then
return -1
elseif msg.isButtonPressed()
print "button pressed: ";msg.GetIndex()
EXIT WHILE
else
' ignore other unknown or uninteresting roSpringBoardScreenEvents
endif
else
' ignore other events, not type roSpringboardScreenEvent
endif
end while
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!