Kodi Community Forum
How to automatically launch a plugin - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+--- Thread: How to automatically launch a plugin (/showthread.php?tid=126520)



How to automatically launch a plugin - Gavinny - 2012-03-25

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?


AW: How to automatically launch a plugin - mad-max - 2012-03-25

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


RE: How to automatically launch a plugin - bluray - 2012-03-25

(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......




RE: AW: How to automatically launch a plugin - Gavinny - 2012-03-25

(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!


RE: How to automatically launch a plugin - mad-max - 2012-03-26

Glad I could help...
So I assume it's working?


RE: How to automatically launch a plugin - Bstrdsmkr - 2012-03-26

You could also create a small service addon which would give you slightly more control at the expense of a little more complexity


RE: How to automatically launch a plugin - Gavinny - 2012-03-27

(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!


RE: How to automatically launch a plugin - paddycarey - 2012-03-27

(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.


RE: AW: How to automatically launch a plugin - Gavinny - 2012-04-30

(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


RE: How to automatically launch a plugin - gyrandoo - 2012-06-08

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?


RE: How to automatically launch a plugin - riazrahman - 2013-05-18

did anyone ever figure this out? I'd like to be able to do the same thing


RE: How to automatically launch a plugin - Swindmiller - 2013-07-24

I would like to be able to do this as well without modifying the skin if possible.

Thanks,
Scott


RE: How to automatically launch a plugin - artrafael - 2013-07-24

No need to modify the skin or create a service add-on. Just create a file named autoexec.py in your userdata (wiki) 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.


RE: How to automatically launch a plugin - Swindmiller - 2013-07-25

That worked perfectly, thanks!