change in Home screen:programs to a script default.py

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
tikkiew Offline
Fan
Posts: 347
Joined: Jun 2008
Reputation: 127
Post: #1
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?
find quote
nicoli_k Offline
Team-XBMC Forum Moderator
Posts: 659
Joined: May 2008
Reputation: 0
Location: USA
Post: #2
what about a modification of this: http://forum.xbmc.org/showpost.php?p=328...tcount=153

except make the changes to Programs instead of Weather and change the script location to the script that you want.
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,269
Joined: Jun 2006
Reputation: 55
Location: Earth
Post: #3
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.argv
so somthing like <onclick>RunScript(special://home/scripts/Blah/default.py)</onclick>

Skins I have done....
[Image: skinsq.png]
And others in the past...

Want to know what I'm working on currently? Check me out on Google+
find quote
tikkiew Offline
Fan
Posts: 347
Joined: Jun 2008
Reputation: 127
Post: #4
thanks.
And how can I change the name of programs to the script name?

And does this count for every skin ?
find quote
nicoli_k Offline
Team-XBMC Forum Moderator
Posts: 659
Joined: May 2008
Reputation: 0
Location: USA
Post: #5
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.
(This post was last modified: 2009-05-24 21:58 by nicoli_k.)
find quote
tikkiew Offline
Fan
Posts: 347
Joined: Jun 2008
Reputation: 127
Post: #6
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>
(This post was last modified: 2009-05-26 18:39 by tikkiew.)
find quote