Re: how click on a song, it is added to the default playlist and played
Reply #15 – 2024-11-25 08:54:00
Are you sure there isn't a component that has this function? Components like Facets can not help, since like fooball said, you're not using FB2K to browse your library, you're using Explorer. I can offer two workarounds. 1) OLD workaround: .BAT file - A batch file like this can work, but only if you have the foobar option in Playback menu > 'Playback Follows Cursor' enabled(?) - @echo off "C:\FB2K\foobar2000.exe" /add %1 %2 %3 timeout 2 "C:\FB2K\foobar2000.exe" /play exit ^ Paste into Notepad, change the path to your foobar2000.exe, and File > Save as and type name "foobar2000 add+play.bat " and save in a folder somewhere. (Make sure file extension is .bat and not .txt) Open this folder in Explorer, and right-click the file > Copy . Now type in the address bar, shell:sendto - to open the SendTo folder, then right-click a blank space > Paste Shortcut . (You can rename the shortcut if you like) Now right-click the shortcut > Properties , and select Run: Minimized box (This is why using a shortcut, so the command window does not pop-up). You can also use the Change Icon... button if you like to give it the foobar icon (browse to foobar2000.exe) Finally ... right-click a music file or folder > SendTo > foobar2000 add+play (I'm posting this for any future reference since I suspect you would not really want to go to all this trouble. A further workaround would be to edit the Windows registry to run the batch file by default when you double-click a file (instead of right-click), but I only use portable foobar, so I have no registry entry to test. Someone like Case could probably help point to the correct registry keys - but again this is a lot of workaround) ... 2) NEW workaround: JS script - edit. I use JScript Panel script, if it can help me If I knew how to use it! (Hahahah) Interesting idea. What sample script(s) do you use? Alternative to the above, I tried adding something like this to a script (or add to existing function if already present) -function on_playlist_items_added() { if (plman.GetPlaylistName(plman.ActivePlaylist) == 'Windows Explorer') { if (!fb.IsPlaying) { fb.Play(); } } } ... And it works, but probably should be tweaked a bit. 'Windows Explorer' should be changed to whatever the name of the playlist set in Preferences > Shell Integration - so it only starts playback on this playlist. Again, Playback menu > 'Playback Follows Cursor' needs to be enabled for this as well, so that foobar plays the newly added, selected track. Or I imagine that can be fixed in the script too. (I'll leave it at that for someone who actually knows what they're doing in JScript to help)