Skip to main content

Topic: Run Command (Read 42904 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • foosion
  • [*][*][*][*][*]
  • Moderator
Run Command
foo_runcmd is a component that allows the user to search and invoke arbitrary menu commands. Menu commands can be invoked through command line options or a graphical user interface.

The component can be downloaded from my components page, which also contains preliminary usage instructions.
http://foosion.foobar2000.org/ - my components for foobar2000

  • Zimdgre
  • [*][*]
  • Banned
Run Command
Reply #1
Great, it works, thanks foosion.

Run Command
Reply #2
Thats great, thanks. I love you!     

((((( Strictly4me )))))

EDIT: Doesn't run on 0.9.2 
  • Last Edit: 25 July, 2006, 08:25:58 AM by Strictly4me

  • Squeller
  • [*][*][*][*][*]
Run Command
Reply #3
Many thanks. This is especially great for us remote control users, because we execute actions by starting "foobar.exe /command:" syntax. Replaygain setting wasn't available there...

A very welcome feature would be if you make a "copy command name" function available. When clicking on a command, it could appear in the text field above, then we could copy it...
  • Last Edit: 25 July, 2006, 02:13:56 PM by Squeller

  • TrNSZ
  • [*][*][*][*][*]
  • Developer
Run Command
Reply #4
[deleted]
  • Last Edit: 27 August, 2015, 02:53:55 PM by TrNSZ

  • wraithdu
  • [*][*][*][*]
Run Command
Reply #5
I'm having a strange problem.  I'm using beta 2 with foobar 0.9.4.2 to load a flac image after creation with REACT into a "rip" playlist.  The command works, but not if my "rip" playlist is the currently active (focused) playlist.  If foobar is not running, it will not work if "rip" was the last active playlist (ie foobar opens up with "rip" open).

It will work just fine as long as any other playlist is active/focused in the window.  I get the same problem if I run the command at a cmd prompt.  Simplified version -

Code: [Select]
"C:\path to foobar\foobar2000.exe" /runcmd-files="Edit Other/Add to Playlist/rip" "C:\path to flac\artist - album.flac"


I'm using PanelsUI and a SCPL playlist and the command is from foo_utils.  Any ideas or known bug?

  • foosion
  • [*][*][*][*][*]
  • Moderator
Run Command
Reply #6
I haven't looked at in detail, but I guess the problem would be in foo_utils.
http://foosion.foobar2000.org/ - my components for foobar2000

  • foosion
  • [*][*][*][*][*]
  • Moderator
Run Command
Reply #7
The problem is caused by foo_utils. By default, it does not show the command for the active playlist. Since foo_runcmd uses the API for searching commands that is also used for displaying the regular popup menu, it also sees the command as unavailable. You can fix this by enabling "Show active playlist as target" in the foo_utils preferences (Tools > Playlist tools).
http://foosion.foobar2000.org/ - my components for foobar2000

  • wraithdu
  • [*][*][*][*]
Run Command
Reply #8
Thanks so much for the update.  I haven't tested it fully yet (not on my desktop right now), but it looks like that was the issue judging from my laptop.  Cool

  • ih8gates
  • [*]
Run Command
Reply #9
Is there a way to have a run_command execute on each track change?

Run Command
Reply #10
Question on usage:  I'm trying to create a routine to randomize a playlist, and then sort it by $num(%play_count%,2), which I have in the "Sort by..." window.  AIUI, the code would be:
Code: [Select]
foobar2000.exe /runcmd-edit/sort/randomize
foobar2000.exe /"runcmd-edit/sort/sort by..."

I'm having a problem with the command line opening additional instances of foobar that I've got to fix, but I tried this using the FILE->RUN COMMAND GUI and when I do the second statement the Sort by... window stays open, and I have to click OK to close it.  Is there a way around this?

Second question:  Once I've done the sort, I'd like to set track 1 (top of the list) as the next selection.  I looked through the docs, and although I found the "Add to playback queue" function, I can't figure out how to move the cursor to the top of the list and then select track 1. 

Any help will be greatly appreciated.

  • Squeller
  • [*][*][*][*][*]
Run Command
Reply #11
I use the latest foo_uie_tabs.

I have 3 tabs organized into columns ui layout: "Organize", "Time", "Info".

I'm accessing those with:

foobar2000.exe /runcmd="select tab/info"
foobar2000.exe /runcmd="select tab/time"

For whatever reason, switching to time tab does no more work. Nothing happens. Switching to "info" works. If I enter "t" into the runcmd gui, I see it's a valid command: "View/Tabbed Panel Stack mod/Select tab/Time". But even with this complete string, nothing happens.
I'm using the native command line (/command:"time") now...

Any ideas?

  • foosion
  • [*][*][*][*][*]
  • Moderator
Run Command
Reply #12
For whatever reason, switching to time tab does no more work. Nothing happens. Switching to "info" works. If I enter "t" into the runcmd gui, I see it's a valid command: "View/Tabbed Panel Stack mod/Select tab/Time". But even with this complete string, nothing happens.
I'm using the native command line (/command:"time") now...

Any ideas?

I don't know what the problem is, but could you please check the console? If you try to execute a command from the command line, the component will log the request and what action it took there.


Some answers to older questions (sorry for the delay):
I'm having a problem with the command line opening additional instances of foobar that I've got to fix, but I tried this using the FILE->RUN COMMAND GUI and when I do the second statement the Sort by... window stays open, and I have to click OK to close it.  Is there a way around this?

It's on my to-do list.

Second question:  Once I've done the sort, I'd like to set track 1 (top of the list) as the next selection.  I looked through the docs, and although I found the "Add to playback queue" function, I can't figure out how to move the cursor to the top of the list and then select track 1.

This is not possible with this component.
http://foosion.foobar2000.org/ - my components for foobar2000

  • Squeller
  • [*][*][*][*][*]
Run Command
Reply #13
I don't know what the problem is, but could you please check the console? If you try to execute a command from the command line, the component will log the request and what action it took there.
Thanks for your console hint. I don't know what I did wrong, everything works fine this morning.

  • Maranatha
  • [*][*][*]
Run Command
Reply #14
I am trying to use this component with PanelsUI and the new Album Art Browser (cwbowron). 

The reason is that in order to get the Album Art to show in his new component whenever you first start foobar, you have to use the Main Menu item of  View/Browse Library Album Art .

It was my thinking that I could use this foo_runcmd to automate the process for me. 

I've read the available docs on this component, and tried several combinations of strings, but without result.

The closest I've gotten without getting an error console window is this string:
Code: [Select]
"C:\Program Files\foobar20003\foobar2000.exe" /runcmd="View/Browse Library Album Art"

but it still doesn't do anything, just doesn't return an error is all......


(foobar20003 is my testing installation directory)

Anyone have any idea why the above string will not work?  Thanks!

  • foosion
  • [*][*][*][*][*]
  • Moderator
Run Command
Reply #15
Is there any message on the console?
http://foosion.foobar2000.org/ - my components for foobar2000

  • Maranatha
  • [*][*][*]
Run Command
Reply #16
Is there any message on the console?

No message, the console doesn't come up at all...  foo starts normally without any notification console popping up, however the Browse Library Album Art Command is not being performed..
  • Last Edit: 16 July, 2007, 07:43:45 PM by Maranatha

  • foosion
  • [*][*][*][*][*]
  • Moderator
Run Command
Reply #17
The console never pops up by itself, you have to show it manually using the View/Console command. You are thinking about error popups.
http://foosion.foobar2000.org/ - my components for foobar2000

  • hybridfan
  • [*][*][*]
Run Command
Reply #18
I love this plugin, I have set it up to show the album's wiki page in Firefox
:Foobar 2000:
:MPC --standard:
:iRiver H320 Rockboxed:

  • Maranatha
  • [*][*][*]
Run Command
Reply #19
The console never pops up by itself, you have to show it manually using the View/Console command. You are thinking about error popups.

Sorry 'bout that!

The console reports:

Startup time : 0:02.729920
Elapsed time: 0
runcmd: Resolving main menu command (delayed): View/Browse Library Album Art
Single command found, executing: View/Browse Library Album Art



So, I assume that from that report, the command is being executed?  But, with no apparent results....
  • Last Edit: 17 July, 2007, 06:21:52 AM by Maranatha

  • foosion
  • [*][*][*][*][*]
  • Moderator
Run Command
Reply #20
I love this plugin, I have set it up to show the album's wiki page in Firefox

I think you are confusing foo_runcmd with foo_run.

So, I assume that from that report, the command is being executed?  But, with no apparent results....

Yes, it is executed. I don't know why the command has no effect; you'll have to ask the author of the album art browser about that.
http://foosion.foobar2000.org/ - my components for foobar2000

  • Maranatha
  • [*][*][*]
Run Command
Reply #21
So, I assume that from that report, the command is being executed?  But, with no apparent results....

Yes, it is executed. I don't know why the command has no effect; you'll have to ask the author of the album art browser about that.


Alright, many thanks for your time and help!

  • foosion
  • [*][*][*][*][*]
  • Moderator
Run Command
Reply #22
foo_runcmd 1.0 beta 3

Changes in this version:
  • Alternative search mode. This works like the filter input box in the keyboard shortcut editor and the context menu editor, that is it filters the command list by searching for words you enter. The words may be contained in the command name and path in any order. Use Ctrl+Up and Ctrl+Down in the input box to switch search modes; the search mode setting in advanced preferences is currently just a backup solution and will be removed in the next version.
  • Jump to preferences page. The main menu version of the Run Command dialog lists preferences pages in the form "Preferences/name of page". These are not real menu commands, they are only available in this dialog.
  • Minor changes including: Command description is now a read-only input field, so it is possible to copy it to the clipboard.
http://foosion.foobar2000.org/ - my components for foobar2000

  • Squeller
  • [*][*][*][*][*]
Run Command
Reply #23
Thx. There's also a freedb tagger update?
  • Last Edit: 17 August, 2007, 12:08:26 AM by Squeller

  • foosion
  • [*][*][*][*][*]
  • Moderator
Run Command
Reply #24
Thx. There's also a freedb tagger update?

It merely got a description for the "Get Tags From freedb" command.
http://foosion.foobar2000.org/ - my components for foobar2000