View Full Version : executing python script from dvd remote ?
Hi,
I am trying to execute a python script from the dvd remote by adding a <TAG> in keymap.xml as follows :-
<remote>
<zero>xbmc.executescript('q:\\scripts\\shutdowntimer.py' )</zero>
however, when I press '0' on the DVD remote nothing happen, is there anything wrong with the <TAG> or this cannot be done ?
Thanks!
jmarshall
2006-08-02, 05:20
No need for the ' or the \\
Try:
<remote>
<zero>xbmc.executescript(q:\scripts\shutdowntimer.py)</zero>
</remote>
Thanks , but that din work either .. I tried to make the change as suggested but still nothing happen when I press 'Zero' on the dvd remote.
jmarshall
2006-08-03, 06:20
Post your modified keymap.xml on pastebin.com or using the "paste your log here" function of this forum.
XML uploaded using the "paste your log here" function , let me know if u cant view it. Thanks again!
Dun think i have successfully uploaded the file in my earlier post, here u go ...
http://xbmc.xbox-scene.com/paste/files/Fri082006/Fri08200633106Keymap.xml
Nuka1195
2006-08-04, 06:25
1. is the script in the root folder or a subfolder and is it spelled correctly?
2. Try XBMC.RunScript()
Thanks Nuka1195 !
I managed to execute the script using your method (XBMC.RunScript()), however, the script just hangs the XBOX immediately after it lauches, should I move the script from q:\scripts\ to somewhere else ?
Nuka1195
2006-08-07, 05:00
Shouldn't matter. Does the script work when launching it from the scripts window?
Yes it does execute without problem from the scripts window . i will try to execute some other script and see if it works later when I am back home ..
if it is a script that requires other resources to be in the same directory with the .py file then moving the .py could cause such issues.
lennon105
2006-10-26, 03:42
I'm having the same problem and can't find what I'm doing wrong....
this is my keymap.xml
<global>
<universalremote>
<obc43>playlist</obc43>
<obc49>queue</obc49>
<obc54>XBMC.RunScript(Q:\scripts\XBMClyrics\default.py)</obc54>
</universalremote>
I can see the remote code of 54 on the screen so I know that's working...
I also have a log if needed...
Any help?
Nuka1195
2006-10-26, 05:52
there's a space "defaul t.py"
lennon105
2006-10-27, 01:03
I double checked my Keymap.xml file and there is no space...When I copy and past into the message, no space, but when I preview the post I get the space. I'm going to start with a fresh Keymap from CVS and redo the <universalremote> part to see what will happen.
Thanks
<universalremote>
<obc43>playlist</obc43>
<obc49>queue</obc49>
<obc54>XBMC.RunScript(Q:\scripts\XBMClyrics\default.py)</obc54>
</universalremote>