HOW-TO write GUI settings for XBMC python plugins and scripts (addons) - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Python Add-on Development (/forumdisplay.php?fid=26)
+--- Thread: HOW-TO write GUI settings for XBMC python plugins and scripts (addons) (/showthread.php?tid=29577)
- Nuka1195 - 2009-01-06 00:40
means if the control two positions before this one is equal to 2, enable it
you can also use the ! for not
and gt() for greater than and lt() for less than
hopefully we can better document these in the wiki. i'm not very good at writing.
and you can group commands, i believe only + for and, | for or. i don't think you can mix + and |
- BigBellyBilly - 2009-02-11 15:35
Is there a way of exec a script and/or xbmc function from a setting option ?
ie. option 'View Readme' can launch a script function named viewReadme()
This would allow the of one/same settings dialog instead of having a MainMenu (of actions) which would also have a 'Settings Menu' option.
Quote:<setting id="readme" type="exec" source="viewReadme" label="30000" />
- Nuka1195 - 2009-02-11 17:27
- BigBellyBilly - 2009-02-11 17:33
got an example for me ?
or could you point me to the doc for this plugin settings use. Its not in the plugin.html and struggling to find it in the wiki ?
- Nuka1195 - 2009-02-11 18:36
this log message was in the main trunk, so if someone is adding plugin settings doc to xbmcplugin.cpp, you will have to go thru that repo too. i usually added an example.
- Temhil - 2009-04-01 04:12
I just discover settings.xml in plugins (I know I am more a script guy and so still a newbie with plugins), and would like to say good job, it is very nice and useful to have this feature.
I was wondering is there (or will be) something similar for scripts?
- BigBellyBilly - 2009-04-01 10:46
Has been discussed already http://forum.xbmc.org/showthread.php?tid=45394
Currently on Nuka's TODO list when he has time.
- Temhil - 2009-04-01 14:14
BigBellyBilly Wrote:Has been discussed already http://forum.xbmc.org/showthread.php?tid=45394Thanks for the update BigBellyBilly.
- digitaldesaster - 2009-08-30 11:03
nice function. its working in the menu.. so i am able to edit and save my settings. I tried
to use it for my own script..
the only problem: i can't access the setting from my script.
my settings.xml under scripts/myscript/resources
settings.xml after edit under userdata/script_data/myscript/
import xbmc, xbmcgui,xbmcplugin,sys
language = xbmcplugin.getSetting('language')
choose = xbmcplugin.getSetting('choose')
resmax = xbmcplugin.getSetting('resmax')
resmin = xbmcplugin.getSetting('resmin')
XBMC.log = No settings.xml file could be found!
Whats wrong, please help!
- digitaldesaster - 2009-08-30 17:39
tested it with a plugin version of my script and it works.. so it doesn't work genreally for scripts??