Setting user skin string using python
#1
I have a text label as part of the skin that is currently referring to a user set string (using $INFO and Skin.String). When an event occurs, a script is run and I want to be able to change this label (or change the user set string).

I have found the python documentation for xbmc to be scarce and am not sure how to go about adjusting skin strings.

Any help would be appreciated!
Reply
#2
xbmc.executebuiltin('Skin.SetString(xxx,xxx)')
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#3
Phil, thank you. I am not sure why that didn't occur to me! Much appreciated.
Reply
#4
How to change skin using python code?
Thanks
Reply
#5
Just adding an observation to save others wasting time on this:

xbmc.executebuiltin('Skin.SetString(xxx,xxx)') will probably set the value, but the value is NOT stored in the settings.xml, UNLESS the skin.string is already part of the skin XML files also..

Just learned that the hard way after rolling my own properties->skin.string store-on-exit routine.

I wont go back to using skin.strings now, as it is quite simple for me to rewire the above routine to store the values in a .txt file, on Kodi exit, and retrieve on Kodi startup.
Keep in mind that skin.strings are fairly slow to use as they are written to disc all...the... time... (but that's another story)

I know this thread is very old, but I doubt anything has changed much since then anyways. Smile
Reply
#6
Hmm that's annoying it doesn't write to xml if not already created!
Reply

Logout Mark Read Team Forum Stats Members Help
Setting user skin string using python0