Skip to main content

Topic: Commandline problems (Read 6322 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Warmonger
  • [*]
Commandline problems
I'm trying to control foobar2000 from the command-line, and I'm having some problems. The /play, /stop, etc. commands work as expected, but if I do foobar2000 /command:"Playback/Play", nothing happens. No errors in foobar, no output on the command prompt. Any idea what could be wrong? This looks like the correct syntax to me.

  • Squeller
  • [*][*][*][*][*]
Commandline problems
Reply #1
Is "playback/play" a correct syntax for the native command line? I won't look now: Go and get foo_runcmd from http://foosion.foobar2000.org/, documentation is there. You can perfectly control fb2k then.
  • Last Edit: 21 May, 2007, 04:08:05 PM by Squeller

  • Warmonger
  • [*]
Commandline problems
Reply #2
Is "playback/play" a correct syntax for the native command line? I won't look now: Go and get foo_runcmd from http://foosion.foobar2000.org/, documentation is there. You can perfectly control fb2k then.


According to the docs it is. I've tried it with about 20 different commands, copy-and-pasted straight from the command line wiki, and none have worked.

If it helps, what I'm trying to do is build a music library app that can load an album into a new playlist. Using the command line seemed like the easiest option. Is there any bundled component that allows for IPC of any kind?

  • Squeller
  • [*][*][*][*][*]
Commandline problems
Reply #3
According to the docs it is. I've tried it with about 20 different commands, copy-and-pasted straight from the command line wiki, and none have worked.


Code: [Select]
Available switches:
/add, /play, /pause, /playpause, /prev, /next, /rand, /stop, /exit, /show, /hide, /config
/command:<menu command>, /playlist_command:<context menu command>, /playing_command:<context menu command>
I don't know any other documentation than "foobar2000.exe /help" and iirc Peter was never really interested in the issue. "<menu command> only seems to be the commands name, without the complete menu path information. This is the disadvantage of the native command line interface, it is not necessarily precise.

  • thuan
  • [*][*][*][*][*]
Commandline problems
Reply #4
Have you tried foobar2000.exe /playpause ?

  • Warmonger
  • [*]
Commandline problems
Reply #5
Here's the Command line help wiki that shows the syntax and commands. I've heard of other people being able to use this without anything extra, which is why I'd like to figure out what's wrong.

And yes, as I mentioned, I've tried all the other switches. Everything except /command:, /playlist_command:, and /playing_command: works as expected.

  • eevan
  • [*][*][*][*][*]
Commandline problems
Reply #6
It is /command: "Play or pause". I use it in Girder and it works just fine.
If age or weaknes doe prohibyte bloudletting you must use boxing

  • foosion
  • [*][*][*][*][*]
  • Moderator
Commandline problems
Reply #7
Here's the Command line help wiki that shows the syntax and commands. I've heard of other people being able to use this without anything extra, which is why I'd like to figure out what's wrong.

This wiki page hasn't been updated for foobar2000 0.9 yet; you might notice that there are no "Foobar2000", "Playlist" or "Components" menus. Also, since foobar2000 0.9 /command:x does not parse path information and just tries to match x against the name of a main menu item. That's one of the reasons why foo_runcmd was created.
http://foosion.foobar2000.org/ - my components for foobar2000

  • Warmonger
  • [*]
Commandline problems
Reply #8
Here's the Command line help wiki that shows the syntax and commands. I've heard of other people being able to use this without anything extra, which is why I'd like to figure out what's wrong.

This wiki page hasn't been updated for foobar2000 0.9 yet; you might notice that there are no "Foobar2000", "Playlist" or "Components" menus. Also, since foobar2000 0.9 /command:x does not parse path information and just tries to match x against the name of a main menu item. That's one of the reasons why foo_runcmd was created.


Okay, that explains a lot.

Doing stuff with the syntax /command:"Play or pause" worked. However, there's one command that still doesn't seem to work with the different syntax, which is "Create new playlist". I'll keep experimenting and see if I can figure out what's wrong with that.

  • eevan
  • [*][*][*][*][*]
Commandline problems
Reply #9
Just go to the Preferences>Keyboard Shortcuts. Click Add New and in the tree below find the action you want. Then use that in the /command: "name_of_command"
If age or weaknes doe prohibyte bloudletting you must use boxing

  • Warmonger
  • [*]
Commandline problems
Reply #10
Okay, that seems to work. Thanks a lot for the help.

  • eevan
  • [*][*][*][*][*]
Commandline problems
Reply #11
You're welcome
If age or weaknes doe prohibyte bloudletting you must use boxing

  • gmB
  • [*]
Commandline problems
Reply #12
The foo_scrobblecharts plugin dynamically modifies the context menu to the corresponding artist that is played.
Like this:




The problem is that none of the following commands will work:

"C:\Programme\foobar2000\foobar2000.exe" "/runcmd-playing=Last.fm/Artist Charts Playlist"  <-- This is whats shown in the command tree in the preference pages
"C:\Programme\foobar2000\foobar2000.exe" "/runcmd-playing=Last.fm/%Artist% Charts Playlist"  <-- This doesn't work either.


Does anybody know a workaround?

  • chrisjj
  • [*][*][*]
Commandline problems
Reply #13
Just go to the Preferences>Keyboard Shortcuts. Click Add New and in the tree below find the action you want. Then use that in the /command: "name_of_command"
I find that works for the [main] commands I tried, but not any [context] commands I tried e.g.

Code: [Select]
 start "View" /WAIT "%PROGRAMFILES%\foobar2000\foobar2000.exe" /command:"Select All" /command:"Properties"  R:\Dance\00008637207120-1-2.wma

does "Select All" but not "Properties".

Any workaround?


  • chrisjj
  • [*][*][*]
Commandline problems
Reply #14
Just go to the Preferences>Keyboard Shortcuts. Click Add New and in the tree below find the action you want. Then use that in the /command: "name_of_command"
I find that works for the [main] commands I tried, but not any [context] commands I tried e.g.

Code: [Select]
 start "View" /WAIT "%PROGRAMFILES%\foobar2000\foobar2000.exe" /command:"Select All" /command:"Properties"  R:\Dance\00008637207120-1-2.wma

does "Select All" but not "Properties".

Any workaround?

Please?

  • foosion
  • [*][*][*][*][*]
  • Moderator
Commandline problems
Reply #15
Have you tried running "foobar2000.exe /?" This command will show a window with the following content.
Quote
Available switches:
  /add <list-of-files> - appends the specified files to the current playlist instead of replacing the playlist content and playing them immediately
  /immediate - bypasses the "please wait" dialog when adding files
  /play, /pause, /playpause, /prev, /next, /rand, /stop - playback controls
  /exit - exits foobar2000
  /show, /hide - shows or hides the main foobar2000 window
  /config - opens the Preferences dialog
  /command:<menu command> - invokes the specified main menu command
  /playlist_command:<context menu command> - invokes the specified context menu command on current playlist selection
  /playing_command:<context menu command> - invokes the specified context menu command on currently played track
  /context_command:<context menu command> <files> - invokes the specified context menu command on the specified files
(Emphasis added)
http://foosion.foobar2000.org/ - my components for foobar2000

  • chrisjj
  • [*][*][*]
Commandline problems
Reply #16
  /playlist_command:<context menu command> - invokes the specified context menu command on current playlist selection


Thanks, I'll try

start "View" /WAIT "%PROGRAMFILES%\foobar2000\foobar2000.exe" /command:"Select All" /playlist_command:"Properties"  R:\Dance\00008637207120-1-2.wma