Kodi Community Forum
RunScript for settings.xml defaults - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: RunScript for settings.xml defaults (/showthread.php?tid=166787)



RunScript for settings.xml defaults - powlo - 2013-06-09

Hi,

Is there a way to run a script when a user clicks "Defaults" in an addons settings?

I've tried the obvious in settings.xml:
Code:
default="RunScript($ID,xyz)"

This doesn't work.


RE: RunScript for settings.xml defaults - Nuka1195 - 2013-06-09

no, about the best thing you could do is have a dummy setting "defaults" defaulted to True, then when you're script is first run set that to False and do whatever you wanted to do when you press the defaults button.


RE: RunScript for settings.xml defaults - powlo - 2013-06-09

OK thanks, I'll try that. Is this a feature that's worth requesting? I don't know much about the internals of XBMC so don't know if it's practical.


RE: RunScript for settings.xml defaults - Bstrdsmkr - 2013-06-09

I have to admit, python based settings would be pretty handy