Skin.SetFile? or something similar...
#1
Hi,

I read the manual, and found capabilities for Skin.SetImage, Skin.SetPath, both just for images, if i understand correctly, and Skin.SetString, but I know the Manual isn't always 100 percent up to date, so I was wondering if there is a way of changing the path of the onclick from within the skin? I'm trying to add something where people can customize buttons to launch scripts of their choice from within the skin, similar to the way you do with the Skin.SetImage...but of course, with .py files...Is there anything like this? If not, would this be something that might possibly be added in the near future? Thanks in advance

Tim
Reply
#2
XBMC.RunScript(script) Runs the python script. You must specify the full path to the script, or use Q:\Scripts\Scriptname.py.

took that from the wiki there are a lot more built in functions in there so browse through them
Reply
#3
Check out Xbox-Classic, Jezz_X uses a little trick to do just that with setPath() I believe.

One of the <onclick> would be in myweather.xml.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#4
I'm sorry I misunderstood what you were saying.
Reply
#5
Ok I do it like this in the settings I have a button that sets a skin setting for a path like this
<onclick>Skin.SetPath(WeatherScript_Path)</onclick>

then in the actual launch button you use this as the onclick

<onclick>XBMC.RunScript($INFO[Skin.String(WeatherScript_Path)]\default.py)</onclick>

the only real disadvantages are Scripts need to be in a folder and called default.py (but this is the new standard for scripts anyway
And the other is when browsing for the path it says set Image path
Reply
#6
Awesome! Thanks a bunch. I was afraid it just wasn't possible.
Reply

Logout Mark Read Team Forum Stats Members Help
Skin.SetFile? or something similar...0