Autoexec Service: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{ | {{cleanup}} | ||
= | <section begin="intro" />autoexec.py is an optional python script that users can create in their [[userdata]] folders that will be executed when XBMC starts up.<section end="intro" /> | ||
autoexec.py is an optional python script that users can create in their [[userdata]] folders that will be executed when XBMC starts up. | |||
== Examples == | |||
This script will open up the video files view focused on the root of C:\ when XBMC is started. | This script will open up the video files view focused on the root of C:\ when XBMC is started. | ||
import xbmc | import xbmc | ||
Line 16: | Line 15: | ||
xbmc.executebuiltin('XBMC.ActivateWindow(myvideolibrary,movietitles)') | xbmc.executebuiltin('XBMC.ActivateWindow(myvideolibrary,movietitles)') | ||
== References == | |||
[[Built- | [[Built-in scripting#Using Built-in Functions from python]] | ||
[[ | [[List of built-in functions]] | ||
[[Category:XBMC Manual]] | [[Category:XBMC Manual]] |
Revision as of 08:19, 8 April 2014
This page or section may require cleanup, updating, spellchecking, reformatting and/or updated images. Please improve this page if you can. The discussion page may contain suggestions. |
autoexec.py is an optional python script that users can create in their userdata folders that will be executed when XBMC starts up.
Examples
This script will open up the video files view focused on the root of C:\ when XBMC is started.
import xbmc xbmc.executebuiltin('XBMC.ActivateWindow(videofiles,C:\)')
Here is an example that starts your favourite addon:
import xbmc xbmc.executebuiltin('XBMC.RunScript(script.audio.spotimc)')
And this example takes you to the movie overview:
import xbmc xbmc.executebuiltin('XBMC.ActivateWindow(myvideolibrary,movietitles)')