2012-11-29, 23:32
Can I assign a double command to a key of my remote?
I wish to run a script after a command
Thanks
I wish to run a script after a command
Thanks
<up>up,RunScript(/storage/.xbmc/userdata/script.py)</up>
<up>RunScript(/storage/.xbmc/userdata/script.py)</up>
(2012-11-30, 08:59)artrafael Wrote: As I said in my previous post, your script would run the two commands. In your example, it would be your script.py that contains the two commands you wish to execute with the press of the Up button. By the way, your syntax for the key mapping is incorrect:
it should be:Code:<up>up,RunScript(/storage/.xbmc/userdata/script.py)</up>
Code:<up>RunScript(/storage/.xbmc/userdata/script.py)</up>
import xbmc
xbmc.executebuiltin( "XBMC.Action(Up)" )
xbmc.executebuiltin( "XBMC.Action(AudioToggleDigital)" )
(2012-11-30, 12:09)artrafael Wrote: A Python script with the following contents will move the cursor Up and then toggle the audio setting. I'm assuming this is what you want to do?
Code:import xbmc
xbmc.executebuiltin( "XBMC.Action(Up)" )
xbmc.executebuiltin( "XBMC.Action(AudioToggleDigital)" )
This script is then executed via RunScript when the mapped button is pressed.
(2012-11-30, 12:43)artrafael Wrote: Your request was to have a single keypress perform two actions, specifically Up and AudioToggleDigital. I've shown you how to do that. Now you have the foundational knowledge you need if you want to work on something more complex.
(2012-11-30, 12:43)artrafael Wrote: Your request was to have a single keypress perform two actions, specifically Up and AudioToggleDigital. I've shown you how to do that. Now you have the foundational knowledge you need if you want to work on something more complex.