Absolute path for XBMC.runscript function?
#1
Question 
Hi,

I am trying to modify PM3-HD skin to suit my needs but I got troubles finding some (missing ?) information.
Before asking, I made a lot of research on the wiki, forum and even with my friend Google. But I can not find anything regarding this :

So, how do I set an absolute path (working on all platforms if possible) to run a script when clicking on a freshly created button on a skin :
I found <onclick>Runscript(q:\scripts\test.py</onclick> several time but this does not work on my Windows box
I know that <onclick>Runscript(c:\Program Files\XBMC\scripts\test.py</onclick> is working but I would like an universal path (Something like %XBMC%\scripts\test.py as an example)

Any help will be more than appreciated
Reply
#2
http://xbmc.org/jmarshall/2009/02/10/cha...d-plugins/

I'm pretty sure this is applicable.
Reply
#3
greatant1337 Wrote:http://xbmc.org/jmarshall/2009/02/10/cha...d-plugins/

I'm pretty sure this is applicable.

Thanks greatant1337, it's working !
To answer to my question, it was :
<onclick>XBMC.RunScript(special://xbmc/scripts\test\test.py)</onclick>


May I suggest to update this wiki page by adding a link to this page ?
Reply
#4
LoloMc² Wrote:<onclick>XBMC.RunScript(special://xbmc/scripts\test\test.py)</onclick>

I learned something now too. It's ok to go from forward-slash to back-slash in the path?
I'm assuming that's because special:// is quite special?
Reply
#5
the slash-type used is part of the url format (ALL sane formats use / only msft decided to be irritating) and you should definitely use forward slashes. the code handles mixed slashes though which is why it works
Reply

Logout Mark Read Team Forum Stats Members Help
Absolute path for XBMC.runscript function?0