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: Run Command (Read 76195 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

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.

Re: Run Command

Reply #1
Great, it works, thanks foosion.

Re: Run Command

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

((((( Strictly4me )))))

EDIT: Doesn't run on 0.9.2 

Re: 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...

Re: Run Command

Reply #4
[deleted]

Re: 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?

Re: Run Command

Reply #6
I haven't looked at in detail, but I guess the problem would be in foo_utils.

Re: 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).

Re: 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

Re: Run Command

Reply #9
Is there a way to have a run_command execute on each track change?

Re: 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.

Re: 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?

 

Re: 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.

Re: 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.

Re: 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!


Re: 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..

Re: 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.

Re: 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:

Re: 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....

Re: 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.


Re: 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.

Re: Run Command

Reply #23
Thx. There's also a freedb tagger update?