Play music albums when their folders are double-clicked

I added the script, installed foobar and leo's skin. It works great! Thanks very much!

Hi Leo,
So is there a way to change the behavior of the script so that it does what FunTank mentioned? I also have my paths setup as music/artist/album. I would like to just be able to add the "music" album and then anything I add underneath, new artists or new albums will have this functionality. Perhaps a regular expression somewhere? *\Music\*\*? anything that might help with this request?
Thanks,
AR

It's possible, yes. The script is just a starting point and can be edited if you want it to use different rules.

Great! where in the script can I add a change like that? do you have a suggestion on how to implement? I have very limited knowledge/skills... but I'm a great copy and paster! some might even say... a PRO copy/paster :astonished:

It might already work? Has anyone actually tried? If not, then from the documentation on the FSUtil method Leo is using to compare the paths () all you might need to do is add the parent option to the method call - i.e.:

From the current:

(fsu.ComparePath(path, fsu.Resolve(testPath)))

To:

(fsu.ComparePath(path, fsu.Resolve(testPath), p))

...I think this should have the script compare if the folder path added to the script options in Prefs is a parent path of the folder that is being double-clicked on rather than an exact match. At least, it seems like thats all that might be needed.

The p at the end may need to be in quotes:

(fsu.ComparePath(path, fsu.Resolve(testPath), "p"))

I think I also had it outside the parentheses for the ComparePath call... fixed above (albeit without quotes).

Ok guys, thanks for all the help... so far. I tried both ways, replacing with steje's w/o quotes, and leo's including quotes. Neither one worked. any other suggestion i could try?

I sorted my music by music/artist/album. Leo's code above works for me.

1.Set the base music folder in the script configuration.
Mine is I:\Music or /music
2. thumbnail view needs to be on.
3. have an m3u playlist in every album folder.

AlbumDoubleClick.osp (1.58 KB)

I apologize for reviving this post for this question but can anyone tell me if the music player with the playlist seen in the video for this script is part of DO?
Luckily it is actually shown in the screen shot on the first page of this post.
The only sound player I ever came across was the internal wav player, I don't ever remember seeing any music player with a playlist / album art unless this music player is somehow part of the script package?

I never tried this script myself, but as with most things associated with DO it looks amazing, great work.

The music player is foobar2000.

I don't have m3u files in each folder and instead I would like to launch an external program with the folder path as an argument. But it seems that my syntax is wrong.

Example...

DOpus.NewCommand.RunCommand "C:\MyApps\Scripts\PlayAll.exe"  """" & doubleClickData.tab.Path

What is the right syntax to launch an external command in the script?

Thanks

The quotes in that make the line invalid VBScript syntax before Opus is involved at all.

Please link your account and start a thread in Help & Support for detailed help with how to write VBScript.

Leo,

I made some progress as how to run an external command:

Set WshShell = WScript.CreateObject("WScript.Shell")
Return = WshShell.Run( "C:\MyApps\Scripts\PlayAll.exe "  & """ doubleClickData.tab.Path & """, 0, false)

Is this the right syntax, because when I add those lines it navigates to the folder instead of launching the playall.exe file. I included the OnDoubleClick = True but it still navigates to the folder.

Thanks

Sorry for missing this when it was posted. I meant to reply and then it got buried in my to-do list.

In case you still need it, I think the quotes were slightly wrong. Try this:

Set WshShell = WScript.CreateObject("WScript.Shell")
Return = WshShell.Run( """C:\MyApps\Scripts\PlayAll.exe"" """ & doubleClickData.tab.Path & """", 0, false)

I cannot seem to get the script to work my system is OPUS 11 Windows 8.1

My folder which I copy into the config window when I double click it just goes into the folder and does not play it.

C:\Users\Desmond\Music\New Music Library

Did you configure paths to each music folder? (i.e. C:\Users\Des\Music\New Library\ACDC\Back In Black etc.)

Does each album have a playlist? (i.e. C:\Users\Des\Music\New Library\ACDC\Back In Black\Back In Black - Playlist.m3u)

Are you in thumbnails mode?

Beyond this, I can't help...

Nice script. I have a suggestion: please add some threshold function which checks for the number of subfolders. Because, if i try to open a folder holding several subfolders (= the actual records), the script would add them all to a big playlist, which i usually don't want. So, for example, if we set foldertreshold=3, the script would not get active, if we enter a folder holding more than three folders, preventing to open a multitude of records.

v1.1 update:

The script now checks which mouse button and keys were held down. It will ignore double-clicks made using the middle button, or when Ctrl, Shift or Alt are held down.

This change requires Opus 11.16.1 (beta) or later, which was released today.

Hmm, the new version does not work here anymore. I can't set the path to foobar, as in the first version. Did i overlook something?