Linking scripts on home menu? (AMT)
#1
Is the easiest way to do this to replace the XML of one of the existing entries I'm not using (like Programs) or is there a relatively simple way of adding extra entries to the home menu? I have 2 scripts (AMT and Home Theater) that I'd like to add to my home menu if it's possible.

Thanks.
Reply
#2
A menu item for AMT can be added by adding the following to the home.xml - find the <!-- Main Menu --> section and add it in after the DVD Button content.

Code:
<item id="11">
            <description>AMT Button</description>
            <label>AMT</label>
            <onclick>XBMC.ActivateWindow(videofiles,plugin://video/Apple Movie Trailers II)</onclick>
          </item>

Home Theater or any other menu items can be added the same way, just make sure to change the id to 12 or higher, set the description and label appropriately and then change the onclick setting to reflect the appropriate plugin name.
Reply
#3
Fantastic, thanks for the quick response!
Reply
#4
Good tip, I can confirm that this does work.

Is there any way to set backgrounds for additional items above #12? I know there is no option in the gui but is it possible to edit a config file to achieve this?

Thanks,
Rob
Reply
#5
tret Wrote:Good tip, I can confirm that this does work.

Is there any way to set backgrounds for additional items above #12? I know there is no option in the gui but is it possible to edit a config file to achieve this?

Thanks,
Rob

I was just about the ask the same thing. As far as I can determine, the existing backgrounds are probably in the packed gfx files (textures/richer.xpr).

I think I see how Home.xml could be modified to display a new image for the new button, and I have an image, I'm just not sure how to get the skin engine to reference it given it isn't in (in my case) richer.xpr ...

-m
Reply
#6
Hmm, I ran into a bit of a snag.

Home Theater worked properly because it's installed as a plugin. AMT, though, is installed as a script (and must be to interact properly with the Home Theater plugin). I couldn't figure out how to call the AMT script properly. The closest I came was:

XBMC.RunScript(q://scripts/Apple Movie Trailers/default.py)

This did run the script, but it created and used UserData\script_data\AMT.db instead of UserData\script_data\Apple Movie Trailers\AMT.db. How can I call this script properly? When I do it from within the skin I go:

System -> Scripts -> Apple Movie Trailers
Reply
#7
mst3kroqs Wrote:I was just about the ask the same thing. As far as I can determine, the existing backgrounds are probably in the packed gfx files (textures/richer.xpr).

I think I see how Home.xml could be modified to display a new image for the new button, and I have an image, I'm just not sure how to get the skin engine to reference it given it isn't in (in my case) richer.xpr ...

-m

Try putting the image in the media folder, that should work (I think)
Reply
#8
midgetspy Wrote:Hmm, I ran into a bit of a snag.

Home Theater worked properly because it's installed as a plugin. AMT, though, is installed as a script (and must be to interact properly with the Home Theater plugin). I couldn't figure out how to call the AMT script properly. The closest I came was:

XBMC.RunScript(q://scripts/Apple Movie Trailers/default.py)

This did run the script, but it created and used UserData\script_data\AMT.db instead of UserData\script_data\Apple Movie Trailers\AMT.db. How can I call this script properly? When I do it from within the skin I go:

System -> Scripts -> Apple Movie Trailers


Anyone know how to link a SCRIPT not a plugin and not have the error above? been looking and playing around with no luck Sad
Reply
#9
Hmm, I've tried this for the iplayer plugin and done the obvious and change the AMT link to iPLayer but while I now have the iPlayer link on the Home menu when I click it it does nothing Sad

Can anyone help?

EDIT

Figured it out, the link should be

XBMC.ActivateWindow(MyVideofiles,plugin: etc

instead of

XBMC.ActivateWindow(videofiles,plugin: etc
Reply
#10
what I do and I worked until just now ...
after which I worked, it updates the XBMC to version 9.04 and now I see the buttons but not working!
know the reason?








[Image: 1.JPG]
Reply
#11
Laser78 Wrote:what I do and I worked until just now ...
after which I worked, it updates the XBMC to version 9.04 and now I see the buttons but not working!
know the reason?

you overwrite home.xml that is why, so you need to adjust this again

tret Wrote:Is there any way to set backgrounds for additional items above #12? I know there is no option in the gui but is it possible to edit a config file to achieve this?
Rob

mst3kroqs Wrote:I was just about the ask the same thing. As far as I can determine, the existing backgrounds are probably in the packed gfx files (textures/richer.xpr).

I think I see how Home.xml could be modified to display a new image for the new button, and I have an image, I'm just not sure how to get the skin engine to reference it given it isn't in (in my case) richer.xpr ...

-m



skunkm0nkee Wrote:Try putting the image in the media folder, that should work (I think)


that did not work for me
Do i need to change an xpr file?I don't get this
what kind of extension does image need to be to be recognize?
Reply
#12
I managed to end this way:

<item id="11">
Kiss TV <description> Button </ description>
<label> Kiss TV </ label>
<onclick> XBMC.PlayMedia (C: \ Program Files \ XBMC \ userdata \ playlists \ video \ TV Kiss \ Kiss TV.strm) </ onclick>

rather than q://
I have the exact path and now it works!
Reply
#13
Ok quick question related to this topic. I've got Apple Movie Trailers showing up just fine in the home menu. When I am browsing the trailers, pressing the backspace button takes me up one level to the plugins page listing all of my plugins. Is there anyway to change it so the backspace key will take me back to the home menu when in the trailers plugin?
Reply
#14
Has anyone figured this out for launching a script yet? I'm trying to get a menu item to launch MythBox but so far nothing. I have the menu fine, but as yet my only attempts have either crashed XBMC, or done nothing.

Any suggestions?
Reply
#15
Just so people know (you know - in case they are interested lol)

This worked for me to create a menu item and launch a script, in this case MythBox:


Quote:<onclick>RunScript(/home/mattaus/.xbmc/scripts/MythBox/default.py)</onclick)

Really simple.

Oh new question - can anyone think of a way to launch an external program? I know there is a script/plugin that does this, but I'd rather have the external programs link on the home menu.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Linking scripts on home menu? (AMT)00