Adding multiple custom commands
#1
Hi,

I have Kiosk mode turned on so not to confuse my family, but its annoying when I want to update my library due to new content.

So I added a submenu item to the System menu to run: UpdateLibrary("video") - which works perfectly.

Now I'm thinking I'd like to run 3 commands, i.e. click on one submenu item and it runs: clean library, UpdateLibrary("video"), UpdateLibrary("music")

Is there any way of writing out a custom action which runs three commands, say something like putting a ; between each command or something similar?

Or will the submenu only allow one command to be executed.

Thanks.
Reply
#2
http://kodi.wiki/view/Add-on:Skin_Shortcuts
Reply
#3
Checked that out - thanks. It seems there isn't a way to execute multiple commands in one go...

Am now thinking that I could run some sort of script which would execute the commands?
Reply
#4
xbmc auto update, watchdog, try those
Image
Reply
#5
You can paste 2 commands in 1 shortcut... just place it under the first one... using notepad ++
Reply
#6
Warez - I don't quite follow?

In Aeon Nox, I select Skin settings and then Edit main menu, select sub-menu and select custom action - it only allows one string to be entered??
Reply
#7
Like this.... this is in de skishortcuts folder xml file

<shortcut>
<defaultID />
<label>TV Show Library</label>
<label2>Videobron</label2>
<icon>DefaultShortcut.png</icon>
<thumb />
<action>ActivateWindow(10025,special://profile/addon_data/script.skinshortcuts/7.xsp,return)</action> <<<----1
<action>RunAddOn(script.subscription.pulsar.favourites)</action> <<<<----2
</shortcut>

you see 2 actions under 1 button
Reply
#8
Maybe the "Commands" addon by AddonScripterDE could be helpful? Its in the standard Kodi repo under programs.

I think it can do combination actions too, but I havent used this feature myself.
If I have helped you or increased your knowledge please click the 'Thumb Up - Like' button to show me your appreciation :)
For YouTube questions see the official thread here.
Reply
#9
Using AN Silvo, how do you add a custom Skin Shortcut to a menu?
HTPC: Dell Optiplex 7050 SFF i7-7700 quad-core, 3.6GHz, 16GB
NAS: Synology DS1813+ and DX513, Hybrid RAID (SHR) 48TB usable space
My Media Center | www.CaptainKen.us | www.YouTube.com/KenInGilbert
Reply
#10
(2017-01-13, 06:14)CaptainKen Wrote: Using AN Silvo, how do you add a custom Skin Shortcut to a menu?

For any skin which uses Skin Shortcuts to manage the whole main menu, such as Nox 5 Silvo...

Single command: Change Action > Custom Item

Multiple commands: Pick a name you'll reference your multiple actions by (for example 'MyMultipleActions'). Create a file called overrides.xml in your userdata (wiki) folder. Add the following to it, obviously using the reference you've picked and the actual commands you want to run:

Code:
<overrides>
    <override action="MyMultipleActions">
        <action>[First action to run]</action>
        <action>[Second action to run]</action>
    <override>
<overrides>

(You can include as many <action /> elements as you require)

Then head to Change Action > Custom Item and set the action to 'MyMultipleActions' (no quotes) (or whatever string you've used to reference this action group).
Reply
#11
(2017-01-13, 21:11)BobCratchett Wrote:
(2017-01-13, 06:14)CaptainKen Wrote: Using AN Silvo, how do you add a custom Skin Shortcut to a menu?

For any skin which uses Skin Shortcuts to manage the whole main menu, such as Nox 5 Silvo...

Single command: Change Action > Custom Item

Multiple commands: Pick a name you'll reference your multiple actions by (for example 'MyMultipleActions'). Create a file called overrides.xml in your userdata (wiki) folder. Add the following to it, obviously using the reference you've picked and the actual commands you want to run:

Code:
<override action="MyMultipleActions">
    <action>[First action to run]</action>
    <action>[Second action to run]</action>
<override>

(You can include as many <action /> elements as you require)

Then head to Change Action > Custom Item and set the action to 'MyMultipleActions' (no quotes) (or whatever string you've used to reference this action group).

Thank you @BobCratchett

Do I need the xml file heading and the section heading like this?

Code:
<?xml version="1.0" encoding="UTF-8"?>
<overrides>
   <override action="UpdateLibraryAndArtworkDownloader">
        <action>UpdateLibrary(video,true)</action>
        <action>Kodi.RunScript(script.artwork.downloader, silent=false)</action>
   </override>
</overrides>

Although in the above AD doesn't run?
HTPC: Dell Optiplex 7050 SFF i7-7700 quad-core, 3.6GHz, 16GB
NAS: Synology DS1813+ and DX513, Hybrid RAID (SHR) 48TB usable space
My Media Center | www.CaptainKen.us | www.YouTube.com/KenInGilbert
Reply
#12
My apologies - the section heading is absolutely required and I should have included it in my sample. As far as I know the file heading is optional but certainly won't hurt.

I'm not aware that 'Kodi.RunScript' is a valid built-in function (List of built-in functions (wiki)) - try just 'RunScript'...

(Edit: It's also worth taking note that the userdata (wiki)/overrides.xml file will, for Kodi Leia, either change name to userdata (wiki)/script-skinshortcut.xml or move location to userdata (wiki)/addon_data/script.skinshortcuts/overrides.xml)

Edit 2 - I've made a decision - it will be the second one, which is to say the file will move rather than be renamed for Kodi Leia Smile
Reply
#13
I'm using Krypton with Aeon Nox Silvo. Looks like overrides.xml is located here and has a lot of settings in it.

C:\Users\Admin\AppData\Roaming\Kodi\addons\skin.aeon.nox.silvo\shortcuts

I created a new one and put into the C:\Users\Admin\AppData\Roaming\Kodi\userdata folder as you initially suggested and it works!

I was able to call AD, with this command:
RunAddOn(script.artwork.downloader)

Thank you for your assistance.
HTPC: Dell Optiplex 7050 SFF i7-7700 quad-core, 3.6GHz, 16GB
NAS: Synology DS1813+ and DX513, Hybrid RAID (SHR) 48TB usable space
My Media Center | www.CaptainKen.us | www.YouTube.com/KenInGilbert
Reply
#14
(2017-01-14, 05:35)CaptainKen Wrote: I'm using Krypton with Aeon Nox Silvo. Looks like overrides.xml is located here and has a lot of settings in it.

C:\Users\Admin\AppData\Roaming\Kodi\addons\skin.aeon.nox.silvo\shortcuts

I created a new one and put into the C:\Users\Admin\AppData\Roaming\Kodi\userdata folder as you initially suggested and it works!

I was able to call AD, with this command:
RunAddOn(script.artwork.downloader)

Thank you for your assistance.
Hi Captain, what was the actual line of command you put into Kodi to run these two from Userdata (in the change action bit) Cheers
Reply
#15
Here's what I did. However, note that when it runs it looks as if AD is running first, but no worries as they both end up running. However, AD can take days to actually update the artwork that is not yet stored locally such as disc.png.

C:\Users\Admin\AppData\Roaming\Kodi\userdata\overrides.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<overrides>
<!-- Auto run Artwork Downloader After Library Update -->
   <override action="UpdateLibraryAndArtworkDownloader">
        <action>UpdateLibrary(video,,true)</action>
        <action>RunAddOn(script.artwork.downloader)</action>
   </override>
</overrides>
HTPC: Dell Optiplex 7050 SFF i7-7700 quad-core, 3.6GHz, 16GB
NAS: Synology DS1813+ and DX513, Hybrid RAID (SHR) 48TB usable space
My Media Center | www.CaptainKen.us | www.YouTube.com/KenInGilbert
Reply



Logout Mark Read Team Forum Stats Members Help
Adding multiple custom commands0
This forum uses Lukasz Tkacz MyBB addons.