IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
foobar commandline control and dockable panels
foorious
post Jun 27 2009, 19:28
Post #1


troll / ban evasion


Group: Banned
Posts: 244
Joined: 22-April 08
Member No.: 52991



Like Canar said in another topic :

QUOTE (Canar @ Jun 24 2009, 20:29) *
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.
Go to the top of the page
+Quote Post
fbuser
post Jun 27 2009, 20:46
Post #2





Group: Developer
Posts: 683
Joined: 26-September 07
Member No.: 47369



Without further testing, foo_runcmd may help you here.

This post has been edited by fbuser: Jun 27 2009, 21:02
Go to the top of the page
+Quote Post
foorious
post Jun 28 2009, 21:15
Post #3


troll / ban evasion


Group: Banned
Posts: 244
Joined: 22-April 08
Member No.: 52991



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 ?
Go to the top of the page
+Quote Post
smkk
post Jun 28 2009, 21:39
Post #4





Group: Members
Posts: 603
Joined: 18-November 07
Member No.: 48839



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
Go to the top of the page
+Quote Post
fbuser
post Jun 28 2009, 22:21
Post #5





Group: Developer
Posts: 683
Joined: 26-September 07
Member No.: 47369



He needs a plugin. From the wiki:

QUOTE
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

This post has been edited by fbuser: Jun 28 2009, 22:43
Go to the top of the page
+Quote Post
Yirkha
post Jun 29 2009, 10:41
Post #6





Group: FB2K Moderator
Posts: 2359
Joined: 30-November 07
Member No.: 49158



The wiki is severely outdated. The best way to get current info is to invoke foobar2000.exe /?

For example foobar2000.exe "/playing_command:Tagging/Get Tags From freedb" 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.


--------------------
Full-quoting makes you scroll past the same junk over and over.
Go to the top of the page
+Quote Post
foorious
post Jun 29 2009, 12:08
Post #7


troll / ban evasion


Group: Banned
Posts: 244
Joined: 22-April 08
Member No.: 52991



So I don't need a plugin. Great. smile.gif

I have invoked "foobar2000.exe /?" inside XP's cmd prompt :

CODE
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 ?

CODE
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 ? blink.gif

This post has been edited by foorious: Jun 29 2009, 12:20
Go to the top of the page
+Quote Post
Yirkha
post Jun 29 2009, 12:32
Post #8





Group: FB2K Moderator
Posts: 2359
Joined: 30-November 07
Member No.: 49158



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:
foobar2000.exe "/command:Columns Playlist" for "View menu > Dockable Panels > Collapse > Columns Playlist".
foobar2000.exe "/command:1 - Columns Playlist" for "View menu > Dockable Panels > Activate > 1 - Columns Playlist".


--------------------
Full-quoting makes you scroll past the same junk over and over.
Go to the top of the page
+Quote Post
fbuser
post Jun 29 2009, 12:37
Post #9





Group: Developer
Posts: 683
Joined: 26-September 07
Member No.: 47369



QUOTE (foorious @ Jun 29 2009, 12:08) *
So if we have two Peakmeter Spectrum panels, they will all be named "Peakmeter Spectrum". So how can we differentiate them from the commandline ? blink.gif
Go to "View -> Dockable Panels -> Active Panel -> Custom Title ..." and change the titles to your needs.
Go to the top of the page
+Quote Post
foorious
post Jun 29 2009, 15:43
Post #10


troll / ban evasion


Group: Banned
Posts: 244
Joined: 22-April 08
Member No.: 52991



Thanks to both of you.

Yirkha, your commands work as expected (and much better than the same thing done via foobar shortcuts ! Yay ! biggrin.gif ). fbuser, I hadn't noticed that panel titles could be changed. smile.gif

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 :

CODE
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 ?...

This post has been edited by foorious: Jun 29 2009, 15:48
Go to the top of the page
+Quote Post
Yirkha
post Jul 2 2009, 14:57
Post #11





Group: FB2K Moderator
Posts: 2359
Joined: 30-November 07
Member No.: 49158



Moderation: Subsequent debate about CUI panels in DUI, design choices and other things moved here.


--------------------
Full-quoting makes you scroll past the same junk over and over.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd October 2014 - 05:33