How can I start a script from a remote button?
#1
Question 
Hello!
I would like to know how I can start a script by pressing a button on my remote?
I have tried to search the forums and the wiki, but did not find the information.

I know a little about changing remote.xml, as I have earlier successfully managed to start playback of a playlist by adding:
<zero>XBMC.PlayMedia(<path to m3u file>)</zero>

I cannot, however, find the right command for starting a script.

More specifically I would like to add a button to start the XOT-uzg script: http://www.rieter.net/uitzendinggemist/

Can anyone help me?

BR
Reply
#2
cewan Wrote:Hello!
I would like to know how I can start a script by pressing a button on my remote?
I have tried to search the forums and the wiki, but did not find the information.

I know a little about changing remote.xml, as I have earlier successfully managed to start playback of a playlist by adding:
<zero>XBMC.PlayMedia(<path to m3u file>)</zero>

I cannot, however, find the right command for starting a script.

More specifically I would like to add a button to start the XOT-uzg script: http://www.rieter.net/uitzendinggemist/

Can anyone help me?

BR

this should work:
Quote:<zero>XBMC.RunScript(path to default.py)</zero>


obviously change <zero> to whatever button you like

Zeljko
Reply
#3
I tried this code with the Theater Experience script and I didnt get it working.

I think its my path to the script. This is what I have...
<w>XBMC.RunScript(C:\Users\HTPC\AppData\Roaming\XBMC\scripts\Home Theater Experience\default.py)</w>

Also tried it with...
<w>XBMC.RunScript(C:\Program Files (x86)\XBMC\Scripts\Home Theater Experience\default.py)</w>

whats the deal?
Reply
#4
mccorkled Wrote:I tried this code with the Theater Experience script and I didnt get it working.

I think its my path to the script. This is what I have...
<w>XBMC.RunScript(C:\Users\HTPC\AppData\Roaming\XBMC\scripts\Home Theater Experience\default.py)</w>

Also tried it with...
<w>XBMC.RunScript(C:\Program Files (x86)\XBMC\Scripts\Home Theater Experience\default.py)</w>

whats the deal?



try:

Quote:xbmc.runscript(special://home/scripts/Home Theater Experience/default.py

it works like this on OSX and ATV(different script), also the path you specify must be correct.

Zeljko
Reply
#5
alright. ill give this a try. It seems that this code will only work running in portable mode because if your not, the plugins wont work in, special://home/scripts/

thanks though. Ill give it a whirl
Reply
#6
running from a key action you will not queue the movie. so i don't think this will work.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#7
Nuka1195 Wrote:running from a key action you will not queue the movie. so i don't think this will work.

not too familiar with the script, was explaining how to map it to the button Smile
Reply
#8
what would be nice is:

Code:
<zero>
  <action>Action(Queue,25)</action>
  <action>xbmc.runscript(special://home/scripts/Home Theater Experience/default.py)</action>
</zero>

the code will work as long as you remember to clear the queue, then queue the movie. not what he's looking for i would think.

i see the op, was not discussing the hte script.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#9
why? you can just have the script queue up the item for you.
Reply
#10
doh, that would work even better as it can determine the active window instead of hard coding 25.

thanks
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply

Logout Mark Read Team Forum Stats Members Help
How can I start a script from a remote button?0