Linking scripts on home menu? (AMT)

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
midgetspy Offline
Sick Beard Author
Posts: 866
Joined: Jan 2008
Reputation: 11
Location: Edmonton, Canada
Post: #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.
find quote
Aenima99x Offline
Donor
Posts: 1,127
Joined: Aug 2007
Reputation: 8
Location: California
Post: #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.
find quote
midgetspy Offline
Sick Beard Author
Posts: 866
Joined: Jan 2008
Reputation: 11
Location: Edmonton, Canada
Post: #3
Fantastic, thanks for the quick response!
find quote
tret Offline
Senior Member
Posts: 110
Joined: Aug 2008
Reputation: 1
Post: #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
find quote
mst3kroqs Offline
Junior Member
Posts: 37
Joined: Aug 2004
Reputation: 0
Post: #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
find quote
midgetspy Offline
Sick Beard Author
Posts: 866
Joined: Jan 2008
Reputation: 11
Location: Edmonton, Canada
Post: #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
find quote
skunkm0nkee Offline
Team Razorfish
Posts: 1,886
Joined: Aug 2007
Location: London
Post: #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)
find quote
pandapop Offline
Junior Member
Posts: 17
Joined: Oct 2008
Reputation: 0
Post: #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
find quote
HexusOdy Offline
Aeon Group
Posts: 413
Joined: Sep 2008
Post: #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
(This post was last modified: 2009-05-10 21:45 by HexusOdy.)
find quote
Laser78 Offline
Junior Member
Posts: 38
Joined: May 2009
Reputation: 1
Post: #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]
find quote
tikkiew Offline
Senior Member
Posts: 283
Joined: Jun 2008
Reputation: 127
Post: #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?
(This post was last modified: 2009-05-26 19:21 by tikkiew.)
find quote
Laser78 Offline
Junior Member
Posts: 38
Joined: May 2009
Reputation: 1
Post: #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!

[Image: bbb.png]
find quote
NoPantsJim Offline
Member
Posts: 78
Joined: Aug 2007
Reputation: 0
Post: #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?
find quote
modern69messiah Offline
Member
Posts: 56
Joined: May 2009
Reputation: 0
Post: #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?
find quote
modern69messiah Offline
Member
Posts: 56
Joined: May 2009
Reputation: 0
Post: #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.
(This post was last modified: 2009-06-23 01:36 by modern69messiah.)
find quote