Configurable links (i.e shortcuts to xbmc screens)
#16
thanks(as always) jmarshall.

since i first proposed this addition, i think the idea has moved on from simply 'switching screens' to a 'run script' addition.

what i mean is the remote obc calls a script - the script can then 'switch screen' ~ but as you know, you can do so much more with scripts.

with that said...

suppose for a minute, all obcs ran a script in scripts\rc_actions\ and the scripts were all called activewindowname.obc.py people could effectively handle events for every window automatically.

this would negate the need for configuration of xml file. simply put homewindow.123.py script into \rc_actions\ and when ir obc 123 is pressed in the homewindow, the script is executed!

additional windows require no extra code & scripting becomes an automatic addition.

is this a viable solution? would this require more work upfront (in xbmc coding term)? or am i pain daft?

comments?



i'll save the question about running an xbe from a script for later!
most (if not all) questions have been asked & answered soooooooooo many times, use the search button. (i think i'll put that in my sig!) - done :)
Reply
#17
i think using the built-in function ability would be better. the idea of the built-in functions is that eventually every input system will use the same convention (webserver, ftp custom commands, keymap.xml, hyperlinks, <execute> commands in the skin etc. etc.) so that there is a common entry point.

the main problem with doing it via python, is python doesn't have access to everything in xbmc (although it can do most things you'd want to script). you'd still need to have either a script that can read the remote (ie would need to access stuff from within xbmc) or would require changes to xbmc to call the appropriate script.

i think the best way would be to do it exactly as i described. i would think it can be all done in around 20 lines of code total.

in fact, it'd be so easy to do, i'll do it tonight. i'll also add a "runscript()" built-in function for you, so that you can run the aqt-browser scripts etc. on push of a button.

once the base system is put in place, you can look at adding what functions you need to this common interface - they'll then be added to everything that uses this interface.

cheers,
jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#18
jonathan, that is great news. i look forward to seeing this in action. if i may be so bold as to ask, will you add a add a "runxbe()" built-in function also.

i will look at the changes you make & hopefully get a feel of the steps necessary to implement other functionality.

thanks for your support.
most (if not all) questions have been asked & answered soooooooooo many times, use the search button. (i think i'll put that in my sig!) - done :)
Reply
#19
for sure - runxbe() and runscript() should be no problem at all.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#20
jonathan, can i request you send me a patch of the changes (i'll pm my email if you agree) so i can look at the changes.

it will help me understand what is required for other things i come up with.

cheers - steve.
most (if not all) questions have been asked & answered soooooooooo many times, use the search button. (i think i'll put that in my sig!) - done :)
Reply
#21
(jmarshall @ nov. 11 2004,15:08 Wrote:for sure - runxbe() and runscript() should be no problem at all.
wow this is brilliant news. superb! thankyou soo much!
Reply
#22
done Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#23
indeed!

thanks jonathan, i've managed to compile + test. it works exactly how i'd hoped.

this is what i tested...

Quote:<keymap>
 <global>  
   <action>
     <description>my music shortcut</description>
     <id>xbmc.activatewindow(501)</id>
     <remotecode>151</remotecode>
   </action>
   <action>
     <description>script</description>
     <id>xbmc.runscript(test.py)</id>
     <remotecode>152</remotecode>
   </action>
    <action>
     <description>launch dvdx</description>
     <id>xbmc.runxbe(e:\apps\dvdx\default.xbe)</id>
     <remotecode>153</remotecode>
   </action>

what i've tried...
switch screen from vis - ok
switch to same screen - ok
run script - ok
switch from script to screen - ok
switch from vis to screen - ok
run script while in vis (eventually gonna setup a 'nextvis.py' on this one!Wink (crashed 1st time, ok 2nd time!Wink

what i have yet to try...
switch to from full screen video to script or window.
run script from q:
run xbe from q:
run cut shortcut

so far - looking goooooooooood!

notes for others...
script needs to be full path (eg e:\apps\xbmc\scripts\test.py)
xbe needs to be full path (eg e:\apps\dvdx\default.xbe)


now to program the pronto touch screen remote.

one last thing i haven't tried - configure keymap.xml for gamepad - will this work due to the way you have implemented this?  just thought it would get more use from people without programmable remotes.  i could see 'nextvis' becoming useful (esp. when i have no cdg file for me mp3s)


request: where can i get a list of all the window ids?

once more though, thanks jonathan.  :bowdown:
most (if not all) questions have been asked & answered soooooooooo many times, use the search button. (i think i'll put that in my sig!) - done :)
Reply
#24
haha i get distracted for a moment and when i look back its all taken care of!

fantastic, i'm glad a solution has been found & implemented :d
Reply
#25
Thumbs Up 
if someone could update the online-manual for xbmc (link) with details on this that would be great, wink, wink, nudge, nudge Wink
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#26
guilib/key.h contains all the window ids + action ids.

you should be able to switch to fullscreen video using the toggle stuff that's already there, or just using activatewindow() will do the trick as well.

i may eventually make activatewindow() take in a string parameter, but as you can understand, it's not a huge priority.

have fun with what you have so far Smile

cheers,
jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#27
ok i've tried two builds of xbmc, one from yesterday and one from today. i've added the following to my keymap.xml file which is stored in e:\apps\xbmc (homepath for xbmc)

Quote:<keymap>
 <global>
   <action>
     <description>fbaxxx</description>
     <id>xbmc.runxbe(f:\apps\fbaxxx20040901\default.xbe)</id>
     <remotecode>101</remotecode>
   </action>

when i punch in 101 on my remote i get nothing. i've tried setting the number to something other than 101 and nothing. i've got several entries in there, all with different codes and nothing.

this is at the top of my keymap.xml file. i've even deleted the xbmc save file from tdata and udata and nothing.

i've got a uk remote control and all the other controls work fine with it.

what am i doing wrong here?
Reply
#28
billy, i have some bad news for you if you think that entering 101 on the xbox standard remote will operate this!

the number 101 in <remotecode>101</remotecode> refers to obc (original button code).

if you have a programmable remote, you need to setup your remote to 'fire' obc 101.

understand?

ps, i believe you can still use <remote>1</remote> and use the number 1 to fire it up.  but i would only recomend this on a sub screen (like my programs) not in the global section.

hope that helps.  (btw, if you have a pronto, i can send you my (incomplete) config file - i have obcs 150 ~ 180 setup ready for use)

---------------------------------------------------------------------

edit:
this is how i managed to get obcs for xbox (i'm no guru but i managed thru trial and error) ...

1. get pronoutil & install
2. set it up like this...
Image
zoom
3. click 'calc codes' to generate codes & copy generated codes to notepad & save.
4. in prontoedit, open your button properties, add an ir code & click view/edit, then paste in your code like this...
Image
zoom
5. test your code works (best to enable remotecode viewing in xboxmediacentre.xml so that you can see the obc is working)
6. set up keymap.xml so that obc executes the function you require...
Image
zoom

hope this helps - steve.

---------------------------------------------------------------------

edit 2:  damn, image shack looks like its down!  i'll try reposting pictures later.
most (if not all) questions have been asked & answered soooooooooo many times, use the search button. (i think i'll put that in my sig!) - done :)
Reply
#29
that's good news you've already got them setup in prontoedit. if you wouldn't mind sending that along that would be great.
Reply
#30
hi
this sounds very very nice i got a pronto Smile i will try this tonight.
Livingroom: MacMini Mid summer 2010 4Gb RAM HDMI to Pioneer PDP-434 Plasma 1080i
Kitchen: one xbox 1.1 executer 2.3 chip 120 GB in HD 720p mode
Bedroom: Computer Intel Quad 9400, 8 GB RAM, NVIDIA GTX260, Vista Ultimate 64, Ubuntu 10.10
Reply

Logout Mark Read Team Forum Stats Members Help
Configurable links (i.e shortcuts to xbmc screens)0