Posts: 8
Joined: Jul 2006
Reputation:
0
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!
Posts: 26,215
Joined: Oct 2003
Reputation:
187
No need for the ' or the \\
Try:
<remote>
<zero>xbmc.executescript(q:\scripts\shutdowntimer.py)</zero>
</remote>
Posts: 8
Joined: Jul 2006
Reputation:
0
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.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
Post your modified keymap.xml on pastebin.com or using the "paste your log here" function of this forum.
Posts: 8
Joined: Jul 2006
Reputation:
0
XML uploaded using the "paste your log here" function , let me know if u cant view it. Thanks again!
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
1. is the script in the root folder or a subfolder and is it spelled correctly?
2. Try XBMC.RunScript()
Posts: 8
Joined: Jul 2006
Reputation:
0
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 ?
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
Shouldn't matter. Does the script work when launching it from the scripts window?
Posts: 8
Joined: Jul 2006
Reputation:
0
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 ..
Posts: 2,288
Joined: Nov 2005
Reputation:
5
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.
Posts: 88
Joined: Jul 2006
Reputation:
0
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?
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
there's a space "defaul t.py"
Posts: 88
Joined: Jul 2006
Reputation:
0
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>