change in Home screen:programs to a script default.py - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Skins Support (https://forum.kodi.tv/forumdisplay.php?fid=67) +---- Forum: Skin Archive (https://forum.kodi.tv/forumdisplay.php?fid=179) +----- Forum: PM3.HD (https://forum.kodi.tv/forumdisplay.php?fid=75) +----- Thread: change in Home screen:programs to a script default.py (/showthread.php?tid=51634) |
change in Home screen:programs to a script default.py - tikkiew - 2009-05-24 I want to change in home screen directory programs to a directory that launch a script so it will start the default.py. of a script Is this possible? - nicoli_k - 2009-05-24 what about a modification of this: http://forum.xbmc.org/showpost.php?p=328380&postcount=153 except make the changes to Programs instead of Weather and change the script location to the script that you want. - Jezz_X - 2009-05-24 Right its a pretty easy change but depending on how new your skin is I recently changed PM3.HD you need to find the <onclick> for the programs button and change it to this Quote:RunScript(script[,args]*) Runs the python script. You must specify the full path to the script, or use Q:\Scripts\Scriptname.py. As of 2007/02/24, all extra parameters are passed to the script as arguments and can be accessed by python using sys.argvso somthing like <onclick>RunScript(special://home/scripts/Blah/default.py)</onclick> - tikkiew - 2009-05-24 thanks. And how can I change the name of programs to the script name? And does this count for every skin ? - nicoli_k - 2009-05-24 for pm3.hd find this: <description>Programs push button</description> and underneath that, change <label>$LOCALIZE[0]</label>to <label>Name of Script</label> *keep the /b modifiers so that the font is bold in the skin. I can't figure out how to get it to show in the post since it thinks I want to bold those letters. and change: <onclick>ActivateWindow(Programs)</onclick> to <onclick>RunScript(special://home/scripts/Blah/default.py)</onclick> you'd need to make these changes for whatever skin you use. The location of the file to change may be different depending on the skin you're using. - tikkiew - 2009-05-24 thanks for helping me i got everything working for pm3.hd and pm3. pm3 mod fanart and pm3 works like this seach for the file home.xml in the skin pm3 you will find 2 files change this in the file <onclick>ActivateWindow(MyPrograms)</onclick> <onclick>RunScript(special://home/scripts/name of script/default.py)</onclick> search for this <description>My Programs normal push button</description> and go a little lower and you will need to change this <label>0</label> to <label>Name of script</label> Now I want this to work on mediastream skin I tried a couple of thing with no success I will ask it there if nobody knows here a solution Edit :mediastream works like this A menu for a script can be added by adding the following to the home.xml - find the <!-- Main Menu --> section and add it in after the DVD Button content. <item id="11"> <description>name of script Button</description> <label>name of script</label> <onclick>RunScript(special://home/scripts/name of script/default.py)</onclick> </item> |