"My Scripts", Python Scripts displayed as in "My Programs"
#16
i think the presentation of scripts should be handled in an identical method to the
my programs view.

the current script window is no better than a file view with a .py filter. imagine if you
had to do this with launching xbe's.

also i dont think anyone likes the need to copy our favorite scripts into the 'scripts'
folder for a new installation. (i dont even think the location of the scripts folder is
configurable in the xboxmediacenter.xml).

this is what i recommend:

add to xboxmediacenter.xml a <myscripts> tag in a similar vein to the <myprograms> tag.

Quote:<myscripts>
<default>f:\scripts\media\</default>
<bookmark>
<name>all scripts</name>
<path>f:\scripts\</path>
<depth>2</depth>
</bookmark>
<bookmark>
<name>media</name>
<path>f:\scripts\media\</path>
<depth>1</depth>
</bookmark>
<bookmark>
<name>news</name>
<path>f:\scripts\news</path>
<depth>1</depth>
</bookmark>
<bookmark>
<name>tv guides</name>
<path>f:\scripts\tvguides</path>
</bookmark>
</myscripts>

these bookmark locations will be scanned recursively to the depth (default 1) for
a default.py file (similar to the scan of a default.xbe file). if this is found it is
added to the list with a custom icon if present. since the name isnt embedded in the
file like with an xbe though the name of the containing folder is used.

what do you all think?
if you are worried about renaming older scripts how about scanning for default.py
or <foldername>.py? hopefully the code from my programs can be used.

previous discussion in changing scripts window
Reply
#17
sounds like a good idea; i too hate opening .py files like that.
Reply
#18
i wish this wasnt merged into the other post since mine was kinda different and more specific. :/

ohh well. does anyone know how slow it is to crawl the directories? if it takes longer than a second i suppose the results can be cached (with an update button) to make it faster. but i guess since myprograms doesnt do this it will not be right.

-ast
Reply
#19
would be nice to have an automated python script menu. so instead of manually adding the scripts in the submenu on the home screen they would automatically be listed if dropped into the scripts folder.
Reply
#20
meaning that i end up with a list of 30 scripts, of which i only use a couple ? then you could better have some kind of flagging option in the scripts folder
Reply
#21
Thumbs Up 
(asteron @ aug. 19 2005,01:40 Wrote:i think the presentation of scripts should be handled in an identical method to the
my programs view.  

the current script window is no better than a file view with a .py filter.   imagine if you
had to do this with launching xbe's.  

also i dont think anyone likes the need to copy our favorite scripts into the 'scripts'
folder for a new installation.  (i dont even think the location of the scripts folder is
configurable in the xboxmediacenter.xml).

this is what i recommend:

add to xboxmediacenter.xml a <myscripts> tag in a similar vein to the <myprograms> tag.

Quote:<myscripts>
 <default>f:\scripts\media\</default>
 <bookmark>
   <name>all scripts</name>
   <path>f:\scripts\</path>
   <depth>2</depth>
 </bookmark>
 <bookmark>
   <name>media</name>
   <path>f:\scripts\media\</path>
   <depth>1</depth>
 </bookmark>
 <bookmark>
   <name>news</name>
   <path>f:\scripts\news</path>
   <depth>1</depth>
 </bookmark>
 <bookmark>
   <name>tv guides</name>
   <path>f:\scripts\tvguides</path>
 </bookmark>
</myscripts>

these bookmark locations will be scanned recursively to the depth (default 1) for
a default.py file (similar to the scan of a default.xbe file).   if this is found it is
added to the list with a custom icon if present.   since the name isnt embedded in the
file like with an xbe though the name of the containing folder is used.  

what do you all think?  
if you are worried about renaming older scripts how about scanning for default.py
or <foldername>.py?  hopefully the code from my programs can be used.

previous discussion in changing scripts window
i would support this initiative a full 100%...
Reply
#22
when using the my scripts window, if a folder is selected that has a .py file of the same name inside, launch the py file instead of opening a folder.

lots of scripts are packaged in a folder with image folders and util functions and whatnot... all of which can be seen in the scripts window. if a folder contains a script of the same name the user want to run the script. detect this and save them from having to sort through the extra data and doing the extra click. if the user wants to browse files and folders they can still use the filebrowser.

since you can customize the images on folders you can make the scripts window look almost as good as the my programs window pretty easily Smile
Reply
#23
this has been discussed before. someone suggested making the myscripts window work like myprograms, where it would display only default.py one folder deep. then it would have to read an xml file for the proper title.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#24
yeah that was me Smile but i figure this one would be much easier almost just as good.
Reply
#25
i think it is a great idea, make it seem like the different scripts are actually a part of xbmc
i\'m a lame spammer, and i\'m now banned. kthx bye
Reply
#26
in my desire toe make some scripts look "seamless" with xbmc, i have been using a buttonscroller on the main screen and just add the script to it.

gives me direct access, not messing with other menus
I'm not an expert but I play one at work.
Reply
#27
a script is a plugin and plugins are 3rd party add-ons so should be kept well away from the main xbmc code. imho.

to be honest at one point that many scripts were breaking i deleted them all and used xbmc as it comes in its basic form.

lets not integrate it too much... Smile
Reply
#28
theres a difference between having scripts not integrated and having a poor script launcher.

games/apps are not integrated with xbmc at all but their launcher works great and can be customized in the xml. the script folder though cannot be changed in the xml and our launcher shows random util folders and supporting .py files.

adding a rule

if folder.exists(foldername+'.py')
then folder.launch(foldername+'.py')
else
folder.open()

should be like 5 lines of code and would makes things look a lot better. what if you had to manually edit a skin's xml file like dialogsubmenu.xml every time you wanted to add a new game?



Reply
#29
Star 
anything new about this topic?

i really like the idea to have a menu "my scripts" wich can be organized by an xml file for quick access to often used scripts!

.. could keep the scripts submenu in addition for the rest of the scripts.


greets
Reply
#30
Why not modify the existing my programs window to also list scripts, default.py as people have said, and maybe add an icon overlay that indicates a script, like a P. Then add a default share to xbmc\scripts?
Reply

Logout Mark Read Team Forum Stats Members Help
"My Scripts", Python Scripts displayed as in "My Programs"0