Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to activate and play(!) playlist from commandline? (Read 5901 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to activate and play(!) playlist from commandline?

Hey folks,

I'm having foobar related issues and would love to get some input.

Here's what i'm trying to achieve:
  • Let's say i'm listening to Music from my "Chillout" Playlist.
  • I'm starting a fast and violent game. (haha)
  • I quickly realize that Chillout isn't the best music choice even if i'm able to shuffle through my Chillout playlist via keyboard hotkey.
  • I then would like to switch to my "All Music" playlist via hotkey and listen / shuffle songs from there.
  • I can't find a way to do that.

I'm using Autohotkey for my Hotkey-needs so the best way would be to send several commands to foobar2000.exe.
I'm able to activate a different playlist (via foo_cmd_playlist) but i'm lacking some kind of "select" or play command -> as nothing has been played foobar keeps playling stuff from my Chillout playlist.

This is what i have so far:
  • Activate "All Music" Playlist - WORKS
    foobar2000.exe /playlist-activate:"All Music"
  • Select all files from (All Music-) playlist - WORKS (may not be neccesary)
    foobar2000.exe /runcmd="Edit/Select All"
  • Start playing songs from selected playlist - DOESN'T WORK
    I can't find a command / way to do that.

I've also tried adding the selected files to the Playback queue but i can't find a command for that and then would still need a command to start playing songs from Queue..

Moar info:
I'm using foobar 1.0.2.1.
Help needed! 

Thanks!

How to activate and play(!) playlist from commandline?

Reply #1
foobar2000.exe /playlist-activate:"All Music"

add "/play" at the end

don't forget to activate "playback follows cursor" (which will be reseted after usage by default) as although playlist is switched to desired it isn't "activated" as "nowplaying"

How to activate and play(!) playlist from commandline?

Reply #2
omg, how simple!
Works perfectly now (foobar2000.exe /playlist-activate:"All Music" /play /rand).

Big thx 2E7AH,
another piece to make foobar my ultimate audioplayer, hehe. (:

How to activate and play(!) playlist from commandline?

Reply #3
Works perfectly now (foobar2000.exe /playlist-activate:"All Music" /play /rand).

It not works form me in FB 1.1.13 at start, it not change playlist and play current playlist.
To works, i must:
foobar2000.exe /playlist-activate:"All Music"
and then
foobar2000.exe /play /rand

How to activate and play(!) playlist from commandline?

Reply #4
Enable "playback follows cursor", switch playlist, play, disable "playback follows cursor" used to work for me, but hasn't for the past few fb2k releases. Is this still possible in v1.3.9?
/bw

How to activate and play(!) playlist from commandline?

Reply #5
Got it: You need to add a small delay between play and disable. 0.25s worked for me.
/bw