I wanted to see if it was possible. ![]()
Just don’t press Home, as that will exit the source roku application. Instant Replay is mapped to the target roku for Home
Sub Main()
ipaddr="192.168.1.120" 'target ip address of target roku
canvas=CreateObject("roImageCanvas") 'create a screen
canvas.SetLayer(0, {Color:"#FF000000",CompositionMode:"Source"})
canvas.Show() 'show the screen
port=CreateObject("roMessagePort")
canvas.SetMessagePort(port)
Home="http://"+ipaddr+":8060/keypress/Home"
Rev="http://"+ipaddr+":8060/keypress/Rev"
Fwd="http://"+ipaddr+":8060/keypress/Fwd"
Play="http://"+ipaddr+":8060/keypress/Play"
Select="http://"+ipaddr+":8060/keypress/Select"
Left="http://"+ipaddr+":8060/keypress/Left"
Right="http://"+ipaddr+":8060/keypress/Right"
Down="http://"+ipaddr+":8060/keypress/Down"
Up="http://"+ipaddr+":8060/keypress/Up"
Back="http://"+ipaddr+":8060/keypress/Back"
Info="http://"+ipaddr+":8060/keypress/Info"
currenturl=""
xfer=CreateObject("roUrlTransfer")
checking:
msg=port.GetMessage()
If type(msg)="roImageCanvasEvent"
If msg.isRemoteKeyPressed()
index=msg.GetIndex()
print index
If index=0
currenturl=Back
xfer.SetUrl(currenturl)
xfer.PostFromString("")
ElseIf index=2
currenturl=Up
xfer.SetUrl(currenturl)
xfer.PostFromString("")
ElseIf index=3
currenturl=Down
xfer.SetUrl(currenturl)
xfer.PostFromString("")
ElseIf index=4
currenturl=Left
xfer.SetUrl(currenturl)
xfer.PostFromString("")
ElseIf index=5
currenturl=Right
xfer.SetUrl(currenturl)
xfer.PostFromString("")
ElseIf index=6
currenturl=Select
xfer.SetUrl(currenturl)
xfer.PostFromString("")
ElseIf index=7
currenturl=Home 'used as pressing home on source roku box will exit this channel instead of the target channel
xfer.SetUrl(currenturl)
xfer.PostFromString("")
ElseIf index=8
currenturl=Rev
xfer.SetUrl(currenturl)
xfer.PostFromString("")
ElseIf index=9
currenturl=Fwd
xfer.SetUrl(currenturl)
xfer.PostFromString("")
ElseIf index=10
currenturl=Info
xfer.SetUrl(currenturl)
xfer.PostFromString("")
ElseIf index=13
currenturl=Play
xfer.SetUrl(currenturl)
xfer.PostFromString("")
End If
End If
End If
goto checking
End Sub
