Jump to content


Photo

Script Browser?


  • Please log in to reply
5 replies to this topic

#1 GAT

GAT

    X-S Enthusiast

  • Members
  • 25 posts

Posted 20 April 2005 - 09:32 PM

I have been trying to figure this one out if any one uses it please explain how
to setup and modify py. file


Thanks
Gary

#2 spongy

spongy

    X-S X-perience

  • Members
  • PipPip
  • 387 posts
  • Location:Arizona
  • Xbox Version:v1.0
  • 360 version:unknown

Posted 08 May 2005 - 06:24 PM

I have tried this script a few times since it came out. Without a single success.

After reading your post, I decided to get it running once and for all.

The steps I took
1. I deleted all scripts, and made sure I had the latest python and latest library.
2. I included only scriptbrowser and one script. A script that was confirmed working and had no problems launching from within it's own folder.
3. Tried to launch. Without success.
4. Pressed the white button on the controler to get error log.

Here is what mine said
QUOTE
                    Scripts Output

-->Python Initialized<--
Traceback [most recent call last]:
  File "Q:\scripts\scriptbrowser\scriptbrowser.py", line 106, in ?
    sb = mainClass[]
  File "Q:\scripts\scriptbrowser\scriptbrowser.py", line 61, in__init__
    self.newsel[]
  File "Q:\scripts\scriptbrowser\scriptbrowser.py", line 96, in newsel
    sleep[0.01]
NameError: global name 'sleep' is not defined

5. Knowing my error "global name 'sleep' is not defined". I searched the xml and found this section.
QUOTE
def newSel(self):
  sleep(0.01)
  self.infolabel.setLabel(self.getSelItem())
  self.debuglabel.setLabel(self.getScriptPath() + self.getSelItem() + ".py")

  self.removeControl(self.infoimage)
  del self.infoimage
  self.infoimage = xbmcgui.ControlImage(75,125,100,100,self.getScriptPath() + "\\icon.jpg")
  self.addControl(self.infoimage)

6. I then deleted this line from the xml.
QUOTE
  sleep(0.01)

It works biggrin.gif
7. Spent two hours setting up all my scripts to work with it / making icons etc.
8. Used it
9. Deleted it, replaced with backup.
10. Went back to using scriptionary.

Things I didn't like about scriptbrowser.
Script list ran off the page. Can't see highlighted script when scrolled down.
Script name/icon on the left often didn't match the script highlighted on the right.
Listed items I didn't want listed.(autoexec,HttpCache).


Note: I know nothing about python, scripting, or what this section of the xml does and why.(may have introduced bugs)

Use your white button to get your error msg. If the same, try deleting that line. If different, post error msg here or the official forums. Maybe someone that knows what they're doing will help.

Good luck

#3 spongy

spongy

    X-S X-perience

  • Members
  • PipPip
  • 387 posts
  • Location:Arizona
  • Xbox Version:v1.0
  • 360 version:unknown

Posted 08 May 2005 - 09:39 PM

Scriptionary can be found here.


I meant the .py not .xml in my first post. uhh.gif

#4 nuka1195

nuka1195

    X-S Expert

  • Members
  • PipPipPip
  • 639 posts

Posted 08 May 2005 - 10:25 PM

GAT,

I forgot I did add the following to get this working. I just don't use it anymore. You do need the sleep for the script to be more stable.

Put the following just below the import statement at the top of the file.

from time import sleep

QUOTE
Script name/icon on the left often didn't match the script highlighted on the right.

EDIT: @Spongy, Using he triggers may have caused your problem, also the sleep will help with that.

Edited by nuka1195, 08 May 2005 - 10:27 PM.


#5 spongy

spongy

    X-S X-perience

  • Members
  • PipPip
  • 387 posts
  • Location:Arizona
  • Xbox Version:v1.0
  • 360 version:unknown

Posted 08 May 2005 - 11:00 PM

QUOTE(nuka1195 @ May 8 2005, 12:31 PM)
I just don't use it anymore.

View Post


What do you use to browse scripts ? Submenu ?


Thanks for the proper fix for my error. beerchug.gif

I will try it later. Hopefully it will fix the bugs I had.

Is there any way too ignore certain files/folders in scriptbrowser ?
I don't use autoexec, so I just deleted it. but I do have some folders I would like ignored.

#6 nuka1195

nuka1195

    X-S Expert

  • Members
  • PipPipPip
  • 639 posts

Posted 08 May 2005 - 11:23 PM

I just go straight to the scripts screen. I have all the scripts main py files there with an associated tbn (thumbnail) and their supporting files in a subfolder of a subfolder. This cleans the list up.

To get scriptbrowser to work nice and keep it clean, you'll have to bury the scripts you want ignored in a folder of a folder. You'll also have to make sure the only py file you want listed is in the scripts folder. This requires some editing of the py's.

I like the scripts screen better, though I think the scriptbrowser was a good idea.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users