Launch Scripts from a Skin other then Mayhem?
#1
hello, i have gotten webradio to work fine with mahyem since there is a script button on the right and it launches fine. but if i change my skin the button is gone. i did some searches on this forum and it seems others have this same problem. is is possisble to add a scripts button that will launch .py scripts to any skin?

thanks
#2
heya,
i believe this might be moved to the support or prehaps graphical design sections but i am not the one to decide.
instead i will give you an answer.
basically you need to edit the xml files of the skin of your choice to include your desired function.
lets say you want to add a button to run kml^2 excellent script from the "my music" section.
go to //%xbmc home%/skin/%skin name%/%resolution%/
edit (in notepad for example) the file "mymusicsongs.xml"

now you need to add a section for a new button that will launch the kml^2 script.
here is my example with quick explantion:

 <control>> openning a new control item.
 <description>kml^2 button</description> free form text description
 <type>button</type> type of control
 <id>13</id> id must be unique through-out this file.
 <posx>60</posx> location. this is trial and error. however, take a look at the other buttons. you will prbly want yours on the same x postion as the rest with the same difference on the y. (343, 380, 417 - 37 points here)
 <posy>417</posy>
 <label>18</label> label number will point to a label in the file strings.xml located at /%home%/language/%your language%/ this is what you will see on the button and the label number should be unique through-out the strings.xml file.
 <font>font13</font> font - didnt touch that.
 <script>q:\scripts\1 kmlbrowse.py</script> q is the xbmc home. here the control is told to run the 1 kmlbrowse script loated the %home%/scripts folder.
 <onleft>50</onleft> the series of 4 lines here dictates where the focus will move to on each d-pad press you make. hence the uniqe id tag.
 <onright>50</onright> remeber: you must change the rest of those lines in the other controls on the page to accomodate the new button!
 <onup>11</onup>
 <ondown>2</ondown>
 </control>> end of control.

once you are done you can open the xml file in ie. if it opens right then you can upload it to your box and see how it works. if not then edit the file again. chance are you forgot some slash or something along the file.

hope you will find this useful.
#3
thank you very much sierra13, i will try it out now.
#4
i agree with sierra13. Smile
moving to graphical design.
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!

Logout Mark Read Team Forum Stats Members Help
Launch Scripts from a Skin other then Mayhem?0