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: 867
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
Member+
Posts: 1,036
Joined: Aug 2007
Reputation: 7
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: 867
Joined: Jan 2008
Reputation: 11
Location: Edmonton, Canada
Post: #3
Fantastic, thanks for the quick response!
find quote
tret Offline
Member
Posts: 77
Joined: Aug 2008
Reputation: 0
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: 867
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,887
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: 414
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: 36
Joined: May 2009
Reputation: 0
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
Post Reply