PDA

View Full Version : Skin.SetFile? or something similar...


timdog82001
2007-02-23, 12:34
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

gzusrawx
2007-02-23, 15:22
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

Nuka1195
2007-02-23, 16:25
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.

gzusrawx
2007-02-23, 18:28
I'm sorry I misunderstood what you were saying.

Jezz_X
2007-02-23, 20:35
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

timdog82001
2007-02-24, 01:59
Awesome! Thanks a bunch. I was afraid it just wasn't possible.