Kodi Community Forum

Full Version: Execute script upon XBMC navigation?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Sorry if this is obvious to some, but I didn't see anything in the forum or wiki. Are there configuration options that will allow for a script or scripts to be automatically executed based on the user's navigation in XBMC? So if I navigate to Music XBMC would invoke music.py, Movies or TV would invoke video.py, etc?

Here's where I'm going. The Linux port is progressing nicely, and that will allow for some new (and I hope easy) integration options. I'm thinking of a python script that would send RS232 messages via serial port to a receiver/preamp - change inputs, surround settings, volume level, etc. Before I jump into the Linux serial port research, I'd like to know that the hooks are present in XBMC for something like this.

Thanks -

Blake
Technically it is possible, yes.

You could either do so via a "background" script that requests the current window every now and then, or you could invoke separate scripts on either navigation (via the skin) or on window open (via the skin).

Cheers,
Jonathan
Thanks. Do you know offhand if any of the existing skins have implemented this something like this? If so, I'll use them/it for testing and focus on the Linux serial port stuff first.