4

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.

Patrik
  • 1,286
  • 1
  • 31
  • 64
  • From the [XBMC Wiki Manual](http://wiki.xbmc.org/) it sounds like all you'd need to do is either create an [`autoexec.py`](http://wiki.xbmc.org/index.php?title=Autoexec.py) file with those instructions in it or append them to it if the file already exists. – martineau Sep 22 '13 at 16:28
  • Yes but where are step by step instructions. There is only a description how to make an Addon (GUI related). I need a service (background script). Somebody needs to take some kind of the installation package and run it. I will need to put the instructions there in the package to append the autoexec.py but how does look like the package if there exist one. – Patrik Sep 22 '13 at 17:57
  • XMBC is open source software and which means sometimes you have to figure things out and write specialized code to do what you want yourself -- including writing or adding to the collaborative documentation. – martineau Sep 22 '13 at 20:15
  • Maybe this would help: http://wiki.xbmc.org/index.php?title=HOW-TO:_Automatically_start_addons_using_services – Mark Veenstra Sep 25 '13 at 13:04
  • Yes, markdark it is exactly what I need. – Patrik Sep 30 '13 at 08:23

1 Answers1

-1

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

Chris Barry
  • 4,564
  • 7
  • 54
  • 89