I originally made this code to work for the plex client on my wife's laptop. I wondered what would happen if I replaced the ip address of her laptop to the ip address of my roku box ... tada..it worked on my roku also. PLex will have to be installed on your roku box and the plex server on your pc. I tried this on the original roku and also on the roku 2, both work.
up$ = "http://127.0.0.1:32400/system/players/192.168.2.9/navigation/moveUp"
down$ = "http://127.0.0.1:32400/system/players/192.168.2.9/navigation/moveDown"
left_$ = "http://127.0.0.1:32400/system/players/192.168.2.9/navigation/moveLeft"
right_$ = "http://127.0.0.1:32400/system/players/192.168.2.9/navigation/moveRight"
select$ = "http://127.0.0.1:32400/system/players/192.168.2.9/navigation/select"
back$ = "http://127.0.0.1:32400/system/players/192.168.2.9/navigation/back"
play$ = "http://127.0.0.1:32400/system/players/192.168.2.9/playback/play"
pause$ = "http://127.0.0.1:32400/system/players/192.168.2.9/playback/pause"
load dll "urlmon",1
LOAD DLL "wininet",2
do
if upkey()=1
clear = CALL DLL(2,"DeleteUrlCacheEntryA", up$)
control =CALL DLL(1,"URLDownloadToFileA",0,up$,"",0,0)
endif
if downkey()=1
clear = CALL DLL(2,"DeleteUrlCacheEntryA", down$)
control =CALL DLL(1,"URLDownloadToFileA",0,down$,"",0,0)
endif
if leftkey()=1
clear = CALL DLL(2,"DeleteUrlCacheEntryA", left_$)
control =CALL DLL(1,"URLDownloadToFileA",0,left_$,"",0,0)
endif
if rightkey()=1
clear = CALL DLL(2,"DeleteUrlCacheEntryA", right_$)
control =CALL DLL(1,"URLDownloadToFileA",0,right_$,"",0,0)
endif
if returnkey()=1
clear = CALL DLL(2,"DeleteUrlCacheEntryA", select$)
control =CALL DLL(1,"URLDownloadToFileA",0,select$,"",0,0)
endif
///Backspace//
if keystate(14)=1
clear = CALL DLL(2,"DeleteUrlCacheEntryA", back$)
control =CALL DLL(1,"URLDownloadToFileA",0,back$,"",0,0)
endif
//pause/play//
if spacekey()=1
clear = CALL DLL(2,"DeleteUrlCacheEntryA", pause$)
control =CALL DLL(1,"URLDownloadToFileA",0,pause$,"",0,0)
endif
wait 80
loop
You will need to replace 192.168.2.9 with your rokus ip address.