Kodi Community Forum

Full Version: Need to pass a command to start WMC from the Main Menu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey - I'm liking this new skin!! Just setting up a REVO for a friend and was going to use my default setup and skin (AEON NOX) but I think I'll take this one for a test drive...so far like what I see.

Quick question - and I apologize if this is in the posts already but I didn't find it with my search... In AEON NOX - I use one of the CUSTOM main menu items to start Windows Media Center (leaving XBMC running in the background). I've played with different ways of doing this including shutting XBMC down or using a program launcher but never liked the transition - so found a way to do it by having a XBMC run a simple script... the command that is run when that menu item is selected is:

Code:
XBMC.RunScript(special://skin/scripts/WMC.py)

So I'm wondering if there is a way to do this from the ACE Main menu?

For those interested, the python script is basic:

Code:
import os, subprocess
subprocess.Popen(["C:\Windows\ehome\ehshell.exe"], shell=false)

Is this possible? Hope so...

And a general question to those of you that have used lots of skins - where does ACE fit in as far as overhead/taxing the PC vs AEON NOX?

Thanks is advance...
Anyone?
So you want a main menu button which will run your script? How did you achieve this under NOX?

My first thought would be to add your script as a favourite, and then add this to the main menu as a custom button.

If I've misinterpreted your question, and it is a more basic 'how to add a custom button', then you need to go to settings > appearance > settings (button) > Customise Home Screen (which is at the bottom).

ACE has been designed to be super light, and run smoothly on devices like the Pi, so I would think that it is significantly less CPU intensive that NOX.
(2013-05-07, 09:53)Samu-rai Wrote: [ -> ]So you want a main menu button which will run your script? How did you achieve this under NOX?

Under NOX it's pretty simple:
- Settings: Skin: Customizers: Nain Menu item customizer
- Choose one of the "CUSTOM" items already part of the main menu - but currently disabled
- Enable the menu item
- Choose Type: "Custom" (this is the setting that allows you to send the runscript command)
- for the "Enter the new label" - type in what I have in the first code block above
- Change the Menu Descriptor to whatever you want
- Drop the python script into the folder specified in the runscript command
- set the background if you prefer etc. etc.

It's the ability to set a "custom" command that I don't see in the "custom" or "my menu| setting in Ace.

(2013-05-07, 09:53)Samu-rai Wrote: [ -> ]My first thought would be to add your script as a favourite, and then add this to the main menu as a custom button.

I'll have to try the "faves" option but as I recall, I don't think that worked when I tried it in NOX.
(2013-05-07, 17:05)puulima Wrote: [ -> ]
(2013-05-07, 09:53)Samu-rai Wrote: [ -> ]My first thought would be to add your script as a favourite, and then add this to the main menu as a custom button.

I'll have to try the "faves" option but as I recall, I don't think that worked when I tried it in NOX.

ok - so I got it working using FAVOURITES - had to tweak the command a little but set it up as one of the Favourite Items menu items... Don't recall why I couldn't get this working in NOX - must not have tweaked the command or had the syntax incorrect. This approach is actually pretty straightforward.
Glad you got it sorted.
puulima - what do you use to control both wmc and xbmc? I have found that I am not able to control both applications with the same remote and always wind up using a keyboard for wmc use.

Do you launch into wmc or go straight to live tv, guide or an alternate page?
I would like todo something similar
In Confluence you can do

=> 720p/Home.xml
<item id="14">
<label>VDR</label>
<onclick>XBMC.System.Exec(/path/vdr_startscript)</onclick>
<icon>-</icon>
<thumb>-</thumb>
</item>
<=

Now I get in Home Main Menu a Button called VDR. By pressing, XBMC starts my Live-TV Prog and puts itself in the Background. Listening no longer to any Remote Key
Finish VDR, I can bring back XBMC to the Foreground simply by pressing my default XBMC Startup Button (on the Remote)

Unfortunately this did not work on ACE. The Home.xml File is completly different