How to automatically launch a plugin

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Gavinny Offline
Junior Member
Posts: 18
Joined: Feb 2012
Reputation: 0
Post: #1
Is there any way to automatically launch a plugin when XBMC is started? I mainly only use XBMC for one plugin and it would be great if it just launched the plugin right away - I could then exit out of the plugin as normal if I wanted to use something else.

Any ideas?
find quote
mad-max Offline
Posting Freak
Posts: 1,476
Joined: Jul 2010
Reputation: 57
Location: Germany
Post: #2
You can have an onload command in your home.xml that launches the Addon at startup...

You need <onload> and RunAddon(Addon.id)

Sorry for not giving you a ready solution...currently online with tapatalk

[Image: obi3o55x.jpg]
[Image: 7c8w3bu8.png]

- - - Tribute to Metallica - - -

If I managed to help you, please click my reputation
find quote
bluray Offline
Posting Freak
Posts: 8,315
Joined: May 2011
Reputation: 145
Post: #3
(2012-03-25 17:10)Gavinny Wrote:  Is there any way to automatically launch a plugin when XBMC is started? I mainly only use XBMC for one plugin and it would be great if it just launched the plugin right away - I could then exit out of the plugin as normal if I wanted to use something else.

Any ideas?
I thought that you might be interest in this thread- Customizing Windows for XBMC......

>Alienware X51- do it all HTPC
>Simplify XBMC configurations
>HOW-TO Bitstreaming using XBMC
I refused to watch movie without bitstreaming HD audio!
find quote
Gavinny Offline
Junior Member
Posts: 18
Joined: Feb 2012
Reputation: 0
Post: #4
(2012-03-25 17:57)mad-max Wrote:  You can have an onload command in your home.xml that launches the Addon at startup...

You need <onload> and RunAddon(Addon.id)

Sorry for not giving you a ready solution...currently online with tapatalk

Exactly what I needed to know, thanks a lot!
find quote
mad-max Offline
Posting Freak
Posts: 1,476
Joined: Jul 2010
Reputation: 57
Location: Germany
Post: #5
Glad I could help...
So I assume it's working?

[Image: obi3o55x.jpg]
[Image: 7c8w3bu8.png]

- - - Tribute to Metallica - - -

If I managed to help you, please click my reputation
find quote
Bstrdsmkr Offline
Posting Freak
Posts: 803
Joined: Oct 2010
Reputation: 17
Post: #6
You could also create a small service addon which would give you slightly more control at the expense of a little more complexity
find quote
Gavinny Offline
Junior Member
Posts: 18
Joined: Feb 2012
Reputation: 0
Post: #7
(2012-03-26 19:09)mad-max Wrote:  Glad I could help...
So I assume it's working?

Yep, got it working on my Apple TV 2. I'll still see the normal XBMC interface for a second or two but then the plugin starts. Thanks again!
find quote
paddycarey Offline
Senior Member
Posts: 246
Joined: Sep 2009
Reputation: 8
Post: #8
(2012-03-26 19:17)Bstrdsmkr Wrote:  You could also create a small service addon which would give you slightly more control at the expense of a little more complexity

I would also go with this approach. When you edit the skin directly you'll lose any custom changes if the skin gets automatically updated by the addon system.
find quote
Gavinny Offline
Junior Member
Posts: 18
Joined: Feb 2012
Reputation: 0
Post: #9
(2012-03-25 17:57)mad-max Wrote:  You can have an onload command in your home.xml that launches the Addon at startup...

You need <onload> and RunAddon(Addon.id)

Sorry for not giving you a ready solution...currently online with tapatalk

This had been working great but after a clean install, I can't get it to work now. I've added it to Home.xml inside the confluence-vertical skin folder (I'm using Confluence). It isn't launched the plugin Sad Any ideas? I've been trying for two hours to get it to work again Smile
find quote
gyrandoo Offline
Junior Member
Posts: 1
Joined: Jun 2012
Reputation: 0
Post: #10
Hi I would really like to do this as well. I'm confused about how to make service addon. Is there a guide about how to make a service addon to start specific plugins?
find quote
riazrahman Offline
Junior Member
Posts: 2
Joined: May 2013
Reputation: 0
Post: #11
did anyone ever figure this out? I'd like to be able to do the same thing
find quote
Swindmiller Offline
Junior Member
Posts: 9
Joined: Feb 2013
Reputation: 0
Post: #12
I would like to be able to do this as well without modifying the skin if possible.

Thanks,
Scott
find quote
artrafael Offline
Team-XBMC Forum Moderator
Posts: 6,353
Joined: Jul 2010
Reputation: 112
Location: USA
Post: #13
No need to modify the skin or create a service add-on. Just create a file named autoexec.py in your userdata directory and it will execute whatever is in its contents upon XBMC startup.

For example, if you wish to launch the TED Talks video add-on, your autoexec.py would contain the following:
Code:
import xbmc
xbmc.executebuiltin( "ActivateWindow(Videos,plugin://plugin.video.ted.talks)" )

NOTES: If you're running Linux, be sure to grant executable permission to your autoexec.py file. If you're running Windows, be sure your text editor did not surreptitiously add a ".txt" extension to your autoexec.py file.

Now, when you launch XBMC, it will display the home page briefly and then it will launch the specified add-on automatically. When you close the add-on, you'll be returned to the XBMC home page.
find quote
Swindmiller Offline
Junior Member
Posts: 9
Joined: Feb 2013
Reputation: 0
Post: #14
That worked perfectly, thanks!
find quote