Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
[RELEASE] Commands - Map multiple xbmc commands to one remote button
#16
Great work!

I'm trying to create an event which first sends the IR remote 'Stop', then the Suspend command.
('Stop' to stop what's currently playing in XBMC)

So to map above action to button '1' on my remote, I have to add below line to my keyboard.xml?

<one>RunPlugin(plugin://script.commands)</one>

Please find content of my commands. file below.

1###Stop#Suspend

Will this work?

Many thanks for your help
Reply
#17
Is it possible to map a combo command directly to a remote button by passing a parameter i.e. RunPlugin://script.commands/?combo_command_name? I often use the combo CleanLibrary(video)#RunScript(script.artwork.downloader) and I would like to execute directly from a button press rather than have the list of commands pop up. Thanks, and great work!
Reply
#18
(2012-11-03, 21:17)AussieFries Wrote: Great work!

I'm trying to create an event which first sends the IR remote 'Stop', then the Suspend command.
('Stop' to stop what's currently playing in XBMC)

So to map above action to button '1' on my remote, I have to add below line to my keyboard.xml?

<one>RunPlugin(plugin://script.commands)</one>

Please find content of my commands. file below.

1###Stop#Suspend

Will this work?

Many thanks for your help
Hi! Yes, this should work...
Code:
<one>RunPlugin(plugin://script.commands)</one>
opens the "Commands" menu.
But I would replace the "1" with a better title...
This command will not be directly executed when pushing "1" on your remote...
Instead, a list with all your commands will appear...

(2013-02-07, 00:43)evenzak Wrote: Is it possible to map a combo command directly to a remote button by passing a parameter i.e. RunPlugin://script.commands/?combo_command_name? I often use the combo CleanLibrary(video)#RunScript(script.artwork.downloader) and I would like to execute directly from a button press rather than have the list of commands pop up. Thanks, and great work!
Currently, you cant directly map combo commands to one key...Sad But I can add something like that to the next version!
Reply
#19
You're awesome! Thanks for all the hard work on this script!
Reply
#20
Just wanted to say thanks again

this addon increased the waf of my system greatly :-)
Reply
#21
I like this addon, but I wanted to execute commands defined with this addon directly from my RC, so I modified the script /home/pi/.xbmc/addons/script.commands/default.py

I added this

Code:
def executeFunc(key,func):
        importCommands(key)
        myCommandsTemp=[]
        for temp in myCommands:
          if temp.find(func+"###")>=0:
            command = temp[temp.find("###")+3:]
            if command.find("#")==-1:
              xbmc.executebuiltin(command)
            else:
              spl=command.split("#")
              for temp in spl:
                xbmc.executebuiltin(temp)

And I replaced

Code:
params=parameters_string_to_dict(sys.argv[2])
key=params.get('key')

if type(key)!=type(str()):
  key=''

if key != '':
    commandsMain('_'+key)
else:
    commandsMain('')

with

Code:
params=parameters_string_to_dict(sys.argv[2])
key=params.get('key')
func=params.get('func')
if type(key)!=type(str()):
  key=''
if type(func)!=type(str()):
  func=''

if func != '':
  if key != '':
      executeFunc('_'+key,func)
  else:
      executeFunc(''+key,func)
else:
  if key != '':
      commandsMain('_'+key)
  else:
      commandsMain('')

Now you can modify the keyboard.xml like this:

<one mod="ctrl,alt">RunPlugin(plugin://script.commands/?func=CycleSubs)</one>

I hope the original developer feels not offended... Blush
Reply
#22
How do I download this addon?
Reply
#23
(2013-02-23, 15:20)frank1119 Wrote: I like this addon, but I wanted to execute commands defined with this addon directly from my RC, so I modified the script /home/pi/.xbmc/addons/script.commands/default.py
Nice, thanks for your modification! Useful for combi-commands. (Every single-command could be directly mapped to a key without this addon...)
I will add this to the next version... (if you agree Wink)

(2013-02-23, 15:20)frank1119 Wrote: I hope the original developer feels not offended... Blush
Not at all! Smile

(2013-02-25, 15:04)MeMeMe Wrote: How do I download this addon?
You can install it via the xbmc.org repo:
Settings -> Add-ons -> Get Add-ons -> XBMC.org Add-ons -> Program Add-ons -> Commands
Reply
#24
(2013-02-25, 15:04)MeMeMe Wrote: How do I download this addon?
You can install it via the xbmc.org repo:
Settings -> Add-ons -> Get Add-ons -> XBMC.org Add-ons -> Program Add-ons -> Commands
[/quote]

Doh! Of course. Thanks
Reply
#25
(2013-02-25, 15:58)AddonScriptorDE Wrote: Nice, thanks for your modification! Useful for combi-commands. (Every single-command could be directly mapped to a key without this addon...)
I will add this to the next version... (if you agree Wink)

Your welcome and of course I agree. Glad to be of some help
Reply
#26
Hello,
This is an excellent addon!!

How will it be possible to add a specific command i.e. Rip CD or Shutdown as a favorite, in order to add it directly to the Main menu??
Reply
#27
(2013-03-16, 22:21)vazexa Wrote: How will it be possible to add a specific command i.e. Rip CD or Shutdown as a favorite, in order to add it directly to the Main menu??
These are all default xbmc commands (full list of all commands), you can add them to your favourites.xml like this:
Code:
<favourite name="Rip Audio CD">RipCD</favourite>
Reply
#28
After I install this add on, and try to Launch it, the script fails. Anyone else getting this error?
Setup:
- nvidia Shield TV Pro
- 8TB Synology DS214play
- 2TB External eSATA

twitter
Reply
#29
(2013-03-25, 07:48)SpiderDice Wrote: After I install this add on, and try to Launch it, the script fails. Anyone else getting this error?
Hard to say if someone is getting your error! Because you didn't posted it... Wink
Please upload your log file so i can have a look at it...
Reply
#30
Log Uploader installed fine, but never sent me the e-mail, and that script failed too. Haha

I grabbed my xbmc.log file, removed all the passwords, and then tried to upload it to xbmclogs.com Apparently, 1.6MB is too big for the server to handle.


TL;DR
Here's my log file:
http://ge.tt/8M3HfRc
Setup:
- nvidia Shield TV Pro
- 8TB Synology DS214play
- 2TB External eSATA

twitter
Reply

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Commands - Map multiple xbmc commands to one remote button1