How to install SelectEx

I've tried dragging it into the script window, copying it into the script directory but I've not been able to install this. How do you do it? It's a dcf file and it shows as a dopus file and I've tried double clicking it, but to no avail.

The *.dcf is the menu-button, which provides some pre-built buttons and functions using SelectEx.

To install the "SelectEx" command, which is used in these buttons, you need to download the "Command.Generic_SelectEx.js.txt" file at the botton of the thread (choose the latest) and move it manually into "/dopusdata/script addins" (this will automatically resolve to a valid path on your system when pasted into a DO location bar). You can also drag'n drop the file onto the prefs -> toolbars -> scripts section, to get it copied there by DO automatically.

Ok the txt file is in the addins folder, and I right clicked on toolbar, chose customise, then pasted the dcf in and I have a SelectEx button with some options. I'll go find the SelectEx commands you gave me for the saving folders thread and see if it's working and also that I can understand it.

Thanks

hi

I put your suggested code to run SelectEx in a button script, then selected a high level folder on NAS and clicked. No m3u file created in C: so I altered that to the desktop as I know that should work. Also added a debug of folder. Showed log screen and that's here (looks like it is going round the loop 10 times and zero is displayed sometimes, but again, no m3u created):

Successfully initialized 'jscript' engine Script started successfully path: \\AS-304T-FC68\sonos5 SelectEx: Successfully initialized 'jscript' engine SelectEx: Script started successfully SelectEx: Script completed SelectEx: Successfully initialized 'jscript' engine SelectEx: Script started successfully SelectEx: 0 SelectEx: Script completed SelectEx: Successfully initialized 'jscript' engine SelectEx: Script started successfully SelectEx: 0 SelectEx: Script completed SelectEx: Successfully initialized 'jscript' engine SelectEx: Script started successfully SelectEx: 0 SelectEx: Script completed SelectEx: Successfully initialized 'jscript' engine SelectEx: Script started successfully SelectEx: Script completed SelectEx: Successfully initialized 'jscript' engine SelectEx: Script started successfully SelectEx: 0 SelectEx: Script completed SelectEx: Successfully initialized 'jscript' engine SelectEx: Script started successfully SelectEx: 0 SelectEx: Script completed SelectEx: Successfully initialized 'jscript' engine SelectEx: Script started successfully SelectEx: Script completed SelectEx: Successfully initialized 'jscript' engine SelectEx: Script started successfully SelectEx: 0 SelectEx: Script completed SelectEx: Successfully initialized 'jscript' engine SelectEx: Script started successfully SelectEx: 0 SelectEx: Script completed SelectEx: Successfully initialized 'jscript' engine SelectEx: Script started successfully SelectEx: 0 SelectEx: Script completed Script completed

Here's the code:

[code]@script jscript

function OnClick(data)
{
var cmd = data.func.command, tab = data.func.sourcetab;
DOpus.Output("path: " + tab.path);
cmd.RunCommand('SelectEx PATH="'+tab.path+'" RANDOM FOLDERS ITEMCOUNT=10 SETVAR=SelexResult');
var folders = (""+tab.vars.get("SelexResult")).split("\n");
for(var f=0;f<folders.length;f++)
cmd.RunCommand('SelectEx LINEAR FILES ITEMCOUNTPERC=100 PATH="'+folders[f]+'" TOFILE="/desktop\MyPlayList.m3u" APPEND');

}
[/code]

Also, I've run out of space on the two standard toolbars I have for buttons and there's an overflow button. What's the best way to organise this to have plenty of space?

You probably don't have permission to write to C:\ root, that's new in recent windows versions if you don't run things in "admin" mode and even then it can happen unless you change file-access permission on root folders.
So writing to C:\ probably failed because of that.

Writing to /desktop failed, because placeholders/aliases passed to TOFILE are not resolved currently by SelectEx..
But we can easily fix that, by resolving /desktop ourself before passing it to SelectEx:

@script jscript function OnClick(data) { var cmd = data.func.command, tab = data.func.sourcetab; DOpus.Output("path: " + tab.path); cmd.RunCommand('SelectEx PATH="'+tab.path+'" RANDOM FOLDERS ITEMCOUNT=10 SETVAR=SelexResult'); var folders = (""+tab.vars.get("SelexResult")).split("\n"); for(var f=0;f<folders.length;f++) cmd.RunCommand('SelectEx LINEAR FILES ITEMCOUNTPERC=100 '+ 'PATH="'+folders[f]+'" '+ 'TOFILE="'+DOpus.FSUtil.Resolve("/desktop\\MyPlayList.m3u")+'" APPEND'); }
Consider adding the *.dcf button provided in the thread below (it's right at the top).
Click it and choose "dump" to make SelectEx spit out more information in case it still struggles to create the playlist file.
It actually should have printed a warning or something if it failed to create the file, so I currently can't say what's wrong, but the resulting trace in the script-console should reveal the cause.
XLog: Helper: XLog (versatile logging approach for DO scripting)

XLog dcf button added and set to dump. I have captured the first part of the log, as it repeats this sequence for probably the 10 folders requested. Note that I tried the SelectEx button itslef to play a random movie and that seems to work. Perhaps we need to go for some good old fashioned DOpus.Output statements. Also, can I run simple SElectEx commands using the CLI just to prove that I've installed correctly. By the way I'm running Windows 7 home premium SP1.

Script started successfully
path: \\AS-304T-FC68\sonos5\JAZZ OFFLINE
SelectEx: Successfully initialized 'jscript' engine
SelectEx: Script started successfully
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: Script completed
SelectEx: Successfully initialized 'jscript' engine
SelectEx: Script started successfully
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: Script completed

I've just done a bit of old fashioned dumping out and this comes from in between the two SelectEx calls, so folders has just been populated:

folders.length: 10
folders: \\AS-304T-FC68\sonos5\JAZZ OFFLINE\WOLFGANG HAFFNER,\\AS-304T-FC68\sonos5\JAZZ OFFLINE\WILLEM BREUKER, etc

These are folders at level2 in this hierarchy, for a small section of music that I don't play often.

Let me explain:

level1 - JAZZ OFFLINE
level2 - ARTIST
level3 - Artist - Album

The main music has an extra level:

level1 - JAZZ
level2 - A to Z
level3 - ARTIST
level4 - Artist - Album (on a few occasions there may be another level here)

I don't know enough about SelectEx to know if this is a problem or not, but alarm bells rang when I saw the high level folders which only contain albums at lower levels. If this is the problem then SelectEx is doing what its told...

Boogy, that output.. a weird thing, whatever I try, I cannot get SelectEx to output just a bunch of zeros.
For me it looks like this for the first call to SelectEx in the button:

Path: \\192.168.0.1\d$\dat\sfx\mp3\album SelectEx: CmdLine: SelectEx PATH="\\192.168.0.1\d$\dat\sfx\mp3\album" RANDOM FOLDERS ITEMCOUNT=10 SETVAR=SelexResult ECHO XLOG=dump SelectEx: SelectEx_RNDLINEAR(): SelectEx: PATH : \\192.168.0.1\d$\dat\sfx\mp3\album SelectEx: RECURSE : false SelectEx: SETVAR : SelexResult SelectEx: SETENV : SelectEx: FOLDERS : true SelectEx: FILES : null SelectEx: DESELECTNOMATCH: false SelectEx: SINGLEFOL : false SelectEx: SINGLEFOLMIN : 1 SelectEx: ACTION : SelectEx: ITEMCOUNT : 10 SelectEx: ITEMCOUNTPERC : null SelectEx: ITEMCOUNTRND : false SelectEx: COMMANDS : SelectEx: NAME : null SelectEx: MINSIZE : null SelectEx: MAXSIZE : null SelectEx: MAXSIZETOTAL : null SelectEx: JSFILTER : null SelectEx: JSBREAK : null SelectEx: COPYTOCOLL : null SelectEx: ECHO : true SelectEx: Scanning [\\192.168.0.1\d$\dat\sfx\mp3\album].. SelectEx: Picking items.. SelectEx: Items (10): SelectEx: \\192.168.0.1\d$\dat\sfx\mp3\album\Deep Forest - Boheme SelectEx: \\192.168.0.1\d$\dat\sfx\mp3\album\Juke Box Classics Vol. 01 SelectEx: \\192.168.0.1\d$\dat\sfx\mp3\album\Jim White - Drill A Hole In That Substrate And Tell Me What You See SelectEx: \\192.168.0.1\d$\dat\sfx\mp3\album\Shania Twain - Up! SelectEx: \\192.168.0.1\d$\dat\sfx\mp3\album\Ministry Of Sound - The Annual 2002 SelectEx: \\192.168.0.1\d$\dat\sfx\mp3\album\Ricky Martin - Sound Loaded SelectEx: \\192.168.0.1\d$\dat\sfx\mp3\album\Charly Lownoise & Mental Theo - Charlottenburg SelectEx: \\192.168.0.1\d$\dat\sfx\mp3\album\Oliver Onions - Bud Spencer & Terence Hill - Greatest Hits SelectEx: \\192.168.0.1\d$\dat\sfx\mp3\album\Tunnel Trance Force Vol. 03 SelectEx: \\192.168.0.1\d$\dat\sfx\mp3\album\Daft Punk - Discovery SelectEx: Done.

I tweaked some options to get even more output and additionally enabled XLog dumping by commandline switch.
Maybe you like to try that one as well. If there is still no sensible output, I guess you need to send me your computer. o)

@script jscript function OnClick(data){ var cmd = data.func.command, tab = data.func.sourcetab; DOpus.Output("Path: " + tab.path); cmd.RunCommand('SelectEx PATH="'+tab.path+'" RANDOM FOLDERS ITEMCOUNT=10 SETVAR=SelexResult ECHO XLOG=dump'); var folders = (""+tab.vars.get("SelexResult")).split("\n"); for(var f=0;f<folders.length;f++){ DOpus.Output("Folder:" + folders[f]); cmd.RunCommand('SelectEx LINEAR FILES ITEMCOUNTPERC=100 '+ 'PATH="'+folders[f]+'" '+ 'TOFILE="'+DOpus.FSUtil.Resolve("/desktop\\MyPlayList.m3u")+'" APPEND ECHO XLOG=dump'); } }

I tried the button out at different points in the folder structure (with XLog set to dump), with similar results, except at this level, the ARTIST folder, with Artist - Album(s) at the next level down, SelectEx is at least showing that it is processing the music files, even though those zeros are still being produced. If I go up one level, the log doesn't show the individual music files being processed. Also, the m3u is produced! First time I've seen this. It is dumped down below. I changed the type to txt and with notepad all the lines run into each other, but with notepad++ there are individual lines. Not 10 albums worth. There are lines for pdf, txt, log, jpg etc also. Feels like progress? perhaps a modified version of SelectEx with some debug?

uccessfully initialized 'jscript' engine
Script started successfully
Path: \\AS-304T-FC68\sonos1\Y\YURI HONING
SelectEx: Successfully initialized 'jscript' engine
SelectEx: Script started successfully
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]
SelectEx: 0
SelectEx: Script completed
Folder:\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]
SelectEx: Successfully initialized 'jscript' engine
SelectEx: Script started successfully
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\03-End Of Fri.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\09-True (Repr.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\08-Nobody Kno.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\Yuri_Honing_Acoustic_Quartet-True.jpg
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\Yuri_Honing_Acoustic_Quartet-True.pdf
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\06-Bring Me T.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\audiochecker.log
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\04-Borchardt.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\01-True.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\07-Yasutani.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\cover.jpg
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\folder.jpg
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\02-Paper Bag.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\05-Paper Bag.flac
SelectEx: 0
Folder:\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation
SelectEx: Script completed
SelectEx: Successfully initialized 'jscript' engine
SelectEx: Script started successfully
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\02-Art Of Hap.mp3
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\09-Tehran.mp3
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\06-The Way Ho.mp3
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\08-A Sweet Su.mp3
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\03-Myst.mp3
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\04-Multidimen.mp3
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\folder.jpg
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\05-Ninth Day.mp3
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\07-B&R.mp3
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\01-Poison Ivy.mp3
SelectEx: 0
Folder:\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]
SelectEx: Script completed
SelectEx: Successfully initialized 'jscript' engine
SelectEx: Script started successfully
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\05-Meet Your .flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\Yuri Honing Wired Paradise - Meet Your Demons.log
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\03-Wild Is Th.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\04-Rollo Thom.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\01-Kaiser Soz.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\08-Pussy Wago.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\Info.txt
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\07-Castor Pol.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\folder.jpg
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\02-Zitelle.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\06-Lost.flac
SelectEx: 0
SelectEx: Script completed
Folder:\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]
SelectEx: Successfully initialized 'jscript' engine
SelectEx: Script started successfully
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\08-True Color.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\Star Tracks.log
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\06-Body And S.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\05-Waterloo.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\cd.jpg
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\audiochecker.log
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\07-Basket Cas.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\03-Some Unexp.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\notes.txt
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\04-Walking On.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\folder.jpg
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\02-True Color.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\01-Isobel.flac
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\tray.jpg
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\Booklet.pdf
SelectEx: 0
Folder:\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]
SelectEx: Script completed
SelectEx: Successfully initialized 'jscript' engine
SelectEx: Script started successfully
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: 0
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\02-Yasutani.mp3
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\01-One Note O.mp3
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\05-Lost Virgi.mp3
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\04-Bley Away.mp3
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\06-Once Is Tw.mp3
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\folder.jpg
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\03-Hell's Kit.mp3
SelectEx: \\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\07-Vertical.mp3
SelectEx: 0
SelectEx: Script completed
Script completed
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\08-True Color.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\Star Tracks.log
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\06-Body And S.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\05-Waterloo.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\cd.jpg
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\audiochecker.log
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\07-Basket Cas.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\03-Some Unexp.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\notes.txt
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\04-Walking On.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\folder.jpg
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\02-True Color.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\01-Isobel.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\tray.jpg
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Star Tracks [FLAC]\Booklet.pdf
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\03-End Of Fri.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\09-True (Repr.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\08-Nobody Kno.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\Yuri_Honing_Acoustic_Quartet-True.jpg
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\Yuri_Honing_Acoustic_Quartet-True.pdf
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\06-Bring Me T.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\audiochecker.log
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\04-Borchardt.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\01-True.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\07-Yasutani.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\cover.jpg
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\folder.jpg
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\02-Paper Bag.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - True [FLAC] [NEW]\05-Paper Bag.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\02-Yasutani.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\01-One Note O.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\05-Lost Virgi.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\04-Bley Away.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\06-Once Is Tw.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\folder.jpg
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\03-Hell's Kit.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Seven [emusic2] [NEW]\07-Vertical.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\05-Meet Your .flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\Yuri Honing Wired Paradise - Meet Your Demons.log
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\03-Wild Is Th.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\04-Rollo Thom.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\01-Kaiser Soz.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\08-Pussy Wago.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\Info.txt
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\07-Castor Pol.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\folder.jpg
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\02-Zitelle.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Meet Your Demons [FLAC]\06-Lost.flac
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\02-Art Of Hap.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\09-Tehran.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\06-The Way Ho.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\08-A Sweet Su.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\03-Myst.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\04-Multidimen.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\folder.jpg
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\05-Ninth Day.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\07-B&R.mp3
\\AS-304T-FC68\sonos1\Y\YURI HONING\Yuri Honing - Temptation\01-Poison Ivy.mp3

I will look into that! In the meantime..

@Jon, Leo?
Do you have an explanation for these continously appearing lines, which don't appear for me?

SelectEx: Successfully initialized 'jscript' engine SelectEx: Script started successfully .. SelectEx: Script completed SelectEx: Successfully initialized 'jscript' engine SelectEx: Script started successfully .. SelectEx: Script completed My feeling is, that it might be related to the missing output?!
Some advanced settings in effect on boogys machine maybe?

@boogy
You run the latest DO version?
What OS?
What is set in prefs -> miscellaneous -> advanced -> script output level?

hi tbone, thanks for persevering

prefs -> miscellaneous -> advanced -> script_output_level=All

Windows 7 (32bit) home premium SP1

dopus 11.13 x86 build 5564 27/03/2015 07:40:33

Is there something I can run from the SelectEx menu button to see if that works (I ran the random movie ok) or does this point to the SelectEx commands being run in the script... some dependancy or setup etc.

Also, may be nothing, but the icon for SelectEx has an exclamation point as part of it - the icon is made up of a document shape in the top left with an exclamation point on it, and a small blue screen on the bottom right. Is there another log or place where an error might have occurred when I installed it?

I ran a selectex menu option to select the first x(5) files and the log shows the usual zeros and nothing else happened. I turned XLog off and this time there are no zeros, just script started and ended, but no selection that I could see. Ah, just tried it with some files rather than folders, with XLog turned off, and the first 5 files are selected, and the log has no strange lines, just started and ended successfully.

Mhh, maybe there's still something wrong with XLog and/or the SelectEx add-in.
I'll put something together that goes in-depth about that logging-issue..

just looking in the Script AddIns directory and there's a file called Command.Generic_SelectEx.js.txt and I just wanted to check that that is what I'm expected to see i.e. it is a txt file, and there's no other directory or anything that should be there.

I also just have an XLog button on my toolbar as a result of dragging the dcf file on to the toolbar - nothing else.

Just wanted to cover the basics as this is new to me and there's a big chance I haven't installed them correctly.

If there's anything else you want me to check, just ask.

Also, could I run SelectEx commands from CLI? I tried SelectEx RANDOM but got nothing, just a cursor, no error message. If so, can you give me some simple examples that I can try?

Thanks

Yes, that looks all right so far, thanks! o)

Running "SelectEx RANDOM" should select one random item in your current/last source if run from the CLI.
It does so for me at least. o) Regarding examples, the SelectEx-thread gives some easy and more complex ones.

First thing I learned is that SelectEx RANDOM wants files in the current directory window, not folders. So I tried SelectEx RANDOM with some files visible and it worked, then SelectEx RANDOM FILECOUNT=5 worked fine.

I've been trying to understand your SelectEx statements, and then to try them out in CLI in command mode.

The first one looks to be selecting 10 folders at random from the current level.

On folder A, I tried:

SelectEx RANDOM FOLDERS ITEMCOUNT=10 ECHO

and got:

SelectEx: \AS-304T-FC68\sonos1\A\ALFREDO RODRIGUEZ
SelectEx: \AS-304T-FC68\sonos1\A\ANTHONY WONSEY
SelectEx: \AS-304T-FC68\sonos1\A\ALLISON MILLER
SelectEx: \AS-304T-FC68\sonos1\A\ARTHUR BLYTHE
SelectEx: \AS-304T-FC68\sonos1\A\ARTUR DUTKIEWICZ
SelectEx: \AS-304T-FC68\sonos1\A\ANOUAR BRAHEM
SelectEx: \AS-304T-FC68\sonos1\A\ARILD ANDERSEN [NORDIC]
SelectEx: \AS-304T-FC68\sonos1\A\AHMAD JAMAL
SelectEx: \AS-304T-FC68\sonos1\A\ANDY SHEPPARD [SELDOM]
SelectEx: \AS-304T-FC68\sonos1\A\ART PEPPER

Your next statement looks like this, for manual use, so I selected ALFREDO RODRIGUEZ and entered it:

SelectEx LINEAR FILES ITEMCOUNTPER=100 ECHO

Nothing came back.

ALFREDO RODRIGUEZ folder contains two folders:

Alfredo Rodriguez - Sounds Of Space [FLAC] [NEW]
Alfredo Rodriguez - The Invasion Parade [FLAC] [NEW]

so there aren't any files at this level, just folders.

Folder Alfredo Rodriguez - Sounds Of Space [FLAC] [NEW] contains:

txt, flac, log etc files.

Running the manual command SelectEx LINEAR FILES ITEMCOUNTPER=100 ECHO on this folder showing these files shows nothing except (this is with XLog turned off, with XLog turned on there are just a few more zeros than there are files in the folder):

SelectEx: Successfully initialized 'jscript' engine
SelectEx: Script started successfully
SelectEx: 0
SelectEx: 0
SelectEx: Script completed

To summarise from my position of ignorance. I think your two SelectEx commands (1) are trying to find 10 random folders and saving them in a variable, followed by (2) a for loop that saves every file in the chosen folders.

Regardless of whether there's a problem in SelectEX or not, I don't think my folder structure is helping COMMAND 1 because you're not finding music folders at that level in the structure, and COMMAND 2 does not seem to be finding the files.

My music structure here:
level
1 sonos1 folder
2 A to Z folders
3 ARTIST folder
4 Artist - Album folder
5 mp3, flac, txt, jpg, log, pdf, etc files

Here's a file name for a music file:

\AS-304T-FC68\sonos1\A\ALFREDO RODRIGUEZ\Alfredo Rodriguez - Sounds Of Space [FLAC] [NEW]\01 - trackname.flac

It makes sense to me to work out what manual commands are needed to extract either random music folder names and then save the music file names (not jpg, log, etc) and then to automate.

p.s. this is brilliant tbone, just need to carry on trying out the commands to learn how it works.

Haha, got the second command working:

SelectEx LINEAR FILES ITEMCOUNTPERC=100 ECHO

My fault, I missed off the C of PERC. I ran this with the music folder open showing the music and other files.

So if we can get the first statement or even two (?) to find music folders, then this one will be able to extract and store the names. It would be good if we had control over the file types so 99% mp3, flac and 1% m4a.

Yep, unless you give it a folder to work on with the PATH option, it acts on the current source tab.
With a folder given by PATH, there is no visible selection of course as the folder is not opened in most of these use cases.

You can try "SelectEx RANDOM MAKEVISIBLE" the next time, it's much easier to see the result with MAKEVISIBLE.

And you can set..
prefs -> miscellaneous -> advanced -> script_output_level to "Errors and Warnings"
..to avoid these "Script initialized/ended" messages.

And maybe you wanna try this:Command.Generic_SelectEx.js.txt (133 KB)
I added some outputs to see how the XLog part initializes, if that won't help to see why you get no output..
we'll find something else to try.. o)

Just noticing you posted this longer text I haven't seen while editing the my previous post..

Your findings about command #1 are correct, command #2 was not correctly used during your research. If used correctly it may still not fit your needs exactly, but I'm happy to extend it to meet your - and the next buddies - needs, but before that can take off, we need to clarify the output thing. You need a solid ground to build castles. o)

Regarding command #2 and your test:
In the button this command is not run like the first, it uses the PATH option to look into the folders that got selected from command #1. You missed to add the PATH statement to one of these selected folders to simulate what the button does.

So try something like:
SelectEx LINEAR FILES ITEMCOUNTPER=100 ECHO PATH="<full path to one of your selected folders"
This should (output) all files contained in that folder, to reduce the resultset to mp3 files add NAME=".mp3$" to the command line.
As said, we can fix these minor issues later and hopefully will. o)

ok will try the new script now

I was updating my last post as you were posting yours, so you may want to back and have a look, as I think there's a gap between command 1 and command 2 and command 1 is not providing real music folders for command 2 to work on.

CORRECTION, it is:
SelectEx LINEAR FILES ITEMCOUNTPERC=100 ECHO PATH="<full path to one of your selected folders"
I missed the "C" and the end of ITEMCOUNTPERC.

I reviewed you post, it is possible that the current commands don't fit your environment yet, but we'll get there step by step.

@Jon and Leo
DO will run SelectEx FROMCLIP instead.
There it is again! The minor typo -> potential big mess problem! Please devs, help!

OK tried the new script, by overwriting the old one in script addins folder. The only difference in output is this line:

Using command line XLog-level [dump]..

Nothing else that I could see.

When I ran it with the level 1 folders showing, nothing was produced (except zeros), because there are no files, only folders, at that level. But now that I'm starting to understand how it works, I can position at a set of music folders for an artist, and I ran it again, and it selected 10 folders at random and then output every file to the m3u file.

So I think the zeros are produced when command 2 is asked to find files and there aren't any because the folder structure is empty of files until the lowest level. I think if you had a little folder hierarchy set up like mine you should see the same problem:
eg MUSIC\B\BRUCE SPRINGSTEEN\Bruce Springsteen - Greatest Hits with some music.

From my perspective, that leaves two problems to solve:

  1. How to find RANDOM lowest level music folders in the hierarchy with command 1.

  2. How to exclude non music files from being output by Command 2 to the m3u file, and each album should be sorted by track.

Summary: Nothing wrong with SelectEx or XLog except they met my music folder structure!!!