How to install Python script on XBMC to automatically launch it at startup

Patrik picture Patrik · Sep 22, 2013 · Viewed 7.9k times · Source

I need to install a Python script in XBMC environment to be launched automatically. The script interacts with the execution of any video. It works and it is tested.

Now I am looking to find a correct way to install the script by the final user. The installation must be able to register the script to be launched automatically after the XBMC is started.

I succeded to launch the script automatically putting the following instructions in the autoeexec.py

import os
import xbmc


xbmc.executescript('special://home/scripts/playeractions.py')

My script is saved in the scripts/playeractions.py .

I am looking to find the instructions to make a correct installation that will install and register my script for auto launch on XBMC start up.

Answer

Chris Barry picture Chris Barry · Feb 8, 2014

This page shows you how to start addons using services.

Or refer to the autoexec version above.

http://wiki.xbmc.org/index.php?title=HOW-TO:Automatically_start_addons_using_services