Script browser
#1
i was wondering if anyone of the python crowd around here would mind rewriting or fixing the scriptbrowser script. here

i actually only got this script to work twice, but the times i used it, i loved it.. i have all my custom icons and whatnot setup for the script to use, but it never has worked properly (except twice).

so, i am requesting for someone to write a script that works just like this one, "crawling" the scripts directory for folders with scripts inside of them by the same name, with icon support would be sweet. it appears from looking at the script it would not be hard for a seasoned python scripter.

thanks in advance for anyone willing...
Image
Reply
#2
a replacement is in the works.

http://www.xboxmediaplayer.de/cgi-bin....t=13564

-ast
Reply
#3
umm, that's not really what i want...
i'm not really into having a script that downloads other scripts and whatnot from a website, doesn't appeal to me. i just want to have a script that will list with thumbnails, my locally installed scripts and then launch the selected script.
Image
Reply
#4
this does seem like a good script, but yuyu, how'd you get it work? i am having no luck in getting it to work.
Reply
#5
try this.

after: import os,xbmc,xbmcgui

add: from time import sleep
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#6
(nuka1195 @ june 19 2005,22:06 Wrote:try this.

after: import os,xbmc,xbmcgui

add: from time import sleep
hmm, thanks nuka for the input. it appears that fixes the problem of the script not actually running but, it will not "launch" any scripts... it just says executing and never does anything. on the two occasions i had it working, it actually did launch the scripts.
weird! thanks though for the bit of input, i guess i can mess around with it if no one else is going to take a stab at fixing it up a bit.
Image
Reply
#7
(yuyu @ june 20 2005,02:07 Wrote:umm, that's not really what i want...
i'm not really into having a script that downloads other scripts and whatnot from a website, doesn't appeal to me. i just want to have a script that will list with thumbnails, my locally installed scripts and then launch the selected script.
well, asteron is right (although that specific thread doesn't say so)...a script brower is planned as a part of that installer. it will be a while until it is released though..
xbmcscripts.com administrator
Reply
#8
i thought the line that launches the script did work, though i do it differently.

try this:

replace:
xbmc.executescript(self.getscriptpath() + "\\" + self.getselitem() + ".py")

with:
xbmc.executebuiltin('xbmc.runscript(self.getscriptpath() + "\\" + self.getselitem() + ".py")')

i still think putting all the main scripts in the root directory and any supporting files off a main sub directory with there own directory works the best.

root -
script.py
script.tbn
extras-
scripts directory-
script.cfg
background.png
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#9
hi,

more information can be found in this thread:
http://www.xboxmediaplayer.de/cgi-bin....t=13564
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#10
ok well then. i modified the script browser ever so slightly and now it works how i always wanted it to.

put the folder in your scripts folder and it should work perfect. to add icons for your script, you name the icon the name of the folder your script is in, such as if i have a quicktimebrowser folder, the icon would be quicktimebrowser.jpg...

if it works, i'll post it as a scriptbrowser mod to the xbmc scripts site.

dload it here
Image
Reply
#11
i looked at your changes.

you have a duplicate addcontrol that should crash the script. you should delete one of them.

def newsel(self):
sleep(0.05)
self.infolabel.setlabel("browsing...")
self.debuglabel.setlabel(self.getscriptpath() + self.getselitem() + ".py")
self.removecontrol(self.infoimage)
del self.infoimage
self.infoimage = xbmcgui.controlimage(75,125,100,100,scriptsdir + "scriptbrowser\\no.jpg")
self.addcontrol(self.infoimage)
self.infoimage = xbmcgui.controlimage(75,125,100,100,self.getscriptpath() + self.getselitem() + ".jpg")
self.addcontrol(self.infoimage)
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#12
(nuka1195 @ june 21 2005,12:58 Wrote:i looked at your changes.

you have a duplicate addcontrol that should crash the script. you should delete one of them.

def newsel(self):
sleep(0.05)
self.infolabel.setlabel("browsing...")
self.debuglabel.setlabel(self.getscriptpath() + self.getselitem() + ".py")
self.removecontrol(self.infoimage)
del self.infoimage
self.infoimage = xbmcgui.controlimage(75,125,100,100,scriptsdir + "scriptbrowser\\no.jpg")
self.addcontrol(self.infoimage)
self.infoimage = xbmcgui.controlimage(75,125,100,100,self.getscriptpath() + self.getselitem() + ".jpg")
self.addcontrol(self.infoimage)
that's on purspose, it will not crash the script, it is simply overwritten if an image exists for the given script, if not then the "no image available" image is shown...

i could not get an if fileexists(blah): statement to work correctly there so, that is what i did...

it works fine for me, does it not on your end?
Image
Reply
#13
two addcontrol's for the same control name will cause an error, but if it works.

after the script you select ends, is scriptbrowser still running? it's suppose to.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#14
(nuka1195 @ june 21 2005,19:01 Wrote:two addcontrol's for the same control name will cause an error, but if it works.

after the script you select ends, is scriptbrowser still running? it's suppose to.
yes, it is still running.

i think i have it running the way i want, thanks for the input nuka1195. now then, anymore suggestions for fixing it up or do you think it is pretty good as is?
Image
Reply
#15
sounds like it works good.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply

Logout Mark Read Team Forum Stats Members Help
Script browser0