Creating a dialog to run scripts? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: Creating a dialog to run scripts? (/showthread.php?tid=200062) |
Creating a dialog to run scripts? - elmerohueso - 2014-07-16 I am trying to make an addon that has several scripts, and I'm calling xbmcgui.WindowXMLDialog to display a dialog (with buttons, text, and graphics) to let the user run the different scripts at will. I'm using <onclick>XBMC.RunScript(path, args)</onclick> to execute the scipts, and they works great with an absolute path, but I need them to run from a relative path to be platform and location independent. The structure is as follows: myskin -resources --skins ---default ----720p -----[skin xml files] --lib ---[my script files] What path can I specify in the <onclick> tag that will properly point to the \resources\lib folder? I've tried special://skin/resources/lib and special://skin/lib, but those don't seem to work. I used special://home and that worked, but it will only work if the addon in in the user folder, not in the install dir (and only if the addon's folder isn't renamed). I want it to work whether installed by a user, or prepackaged in the install dir. It there an equivalent to xbmcaddon.Addon().getAddonInfo('path') that can be run from the XML to dynamically get the addon's path? |