Like Canar said in another topic :
The best-easiest way to control foobar2000 externally is using the commandline. foobar2000.exe /play and whatnot work without configuring keyboard shortcuts and are guaranteed to work regardless of what shortcuts any particular user has set up.
In that case, could somebody give me the right commandline syntax for executing these two actions ?
- View menu > Dockable Panels > Activate > (name of the panel we wish to activate)
- View menu > Dockable Panels > Collapse > (name of the panel we wish to collapse)
Right now I can assigh these two actions to convenient shortcuts and use them within an external AutoHotKey script. But I'd be happy to use the commandline instead if that's the "best-easiest way" to do it.
Thanks for your help.
Without further testing, foo_runcmd (http://foosion.foobar2000.org/components/?id=runcmd&version=1.0+beta+3) may help you here.
Thanks, I didn't know an additional component was needed here.
I simply don't understand why this would be "better-easier" than my actual script that works... any ideas ?
You don't need a plugin for this. The forum search on top of every page of the forum happily provides you more information about foobar's commandline.
http://www.google.com/custom?domains=hydro...D%3A1&hl=en (http://www.google.com/custom?domains=hydrogenaudio.org&q=foobar+commandline&sa=Google+Search&sitesearch=hydrogenaudio.org&client=pub-4544327213918729&forid=1&channel=7051718642&ie=ISO-8859-1&oe=ISO-8859-1&flav=0000&sig=6_g3ghDcS6bRpfcd&cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%23336699%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3AFFFFFF%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%3BGIMP%3A0000FF%3BLH%3A50%3BLW%3A262%3BL%3Ahttp%3A%2F%2Fwww.hydrogenaudio.org%2Fforums%2Flogo50.png%3BS%3Ahttp%3A%2F%2Fwww.hydrogenaudio.org%3BFORID%3A1&hl=en)
He needs a plugin. From the wiki:
Please Note: All of the above works for 0.8.3, but /command: and /playlist_command: doesn't seem to be functional with the 0.9.x version. To work around this problem, try using the hotkey mechanism as listed here:
Following the link which is provided by the wiki:http://www.hydrogenaudio.org/forums/index....st&p=493883 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=55004&view=findpost&p=493883)
The wiki is severely outdated. The best way to get current info is to invoke [font= "Courier New"]foobar2000.exe /?[/font]
For example [font= "Courier New"]foobar2000.exe "/playing_command:Tagging/Get Tags From freedb"[/font] works fine with the default installation of the latest version. What doesn't work are items which are dynamically created, e.g. converter presets - then foo_runcmd comes into play.
So I don't need a plugin. Great.
I have invoked "foobar2000.exe /?" inside XP's cmd prompt :
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
I'm going to try to deal with this... For example, would this command be correct ?
foobar2000.exe /command:View/Dockable Panels/Activate/1 - Peakmeter Spectrum
However, even if it's correct, I think we'll have a problem anyway. Because in the Dockable Panels' "
Activate" menu, all panels have a distinctive number (e.g. "1 - Peakmeter Spectrum"). But in the "
Collapse" menu, there are
no distinctive numbers ! So if we have two Peakmeter Spectrum panels, they will all be named "Peakmeter Spectrum". So how can we differentiate them from the commandline ?
As foosion said in his linked post, "foobar2000 0.9 /command:x does not parse path information and just tries to match x against the name of a main menu item.". Therefore it would be just:
[font= "Courier New"]foobar2000.exe "/command:Columns Playlist"[/font] for "View menu > Dockable Panels > Collapse > Columns Playlist".
[font= "Courier New"]foobar2000.exe "/command:1 - Columns Playlist"[/font] for "View menu > Dockable Panels > Activate > 1 - Columns Playlist".
So if we have two Peakmeter Spectrum panels, they will all be named "Peakmeter Spectrum". So how can we differentiate them from the commandline ?
Go to "View -> Dockable Panels -> Active Panel -> Custom Title ..." and change the titles to your needs.
Thanks to both of you.
Yirkha, your commands work as expected (and much better than the same thing done via foobar shortcuts ! Yay ! ). fbuser, I hadn't noticed that panel titles could be changed.
One small problem remains :
at foobar's startup, some panels keep appearing in the foreground when they shouldn't. I have tried forcing them to close upon foobar startup with the following AutoHotKey command :
Run C:\Program Files\foobar2000\foobar2000.exe "/command:Panelname1" "/command:Panelname2" "/command:Panelname3"
However, this doesn't work ! foobar keeps starting with some panels in the foreground.
Once foobar is completely started, everything works as expected (including the above command if I execute it via AutoHotKey), so it seems to be a startup problem.
So, is there a way to really force foobar to start up with ALL existing panels collapsed ?...
Moderation: Subsequent debate about CUI panels in DUI, design choices and other things moved here (http://www.hydrogenaudio.org/forums/index.php?showtopic=73144).