Skip to main content
Topic: Run Command (Read 52655 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Run Command

Reply #25
Hi foosion, commands like:

Code: [Select]
C:\Programme\foobar2000\foobar2000.exe /runcmd="Preferences/Playback/DSP Manager"
C:\Programme\foobar2000\foobar2000.exe /runcmd="Playback/DSP/Settings"

don't work any more. (The 2nd command is provided by foo_menu_addons). No window popping up. Other commands like "playback/stop" work with your component. Is it possible it happened because I installed the VC9 runtime libraries?

TIA

Run Command

Reply #26
I really, really doubt that this is related to the VC9 runtime. What does the foobar2000 console say when you try to run these commands from the command line?

Run Command

Reply #27
Ah, I regularly forget about the console.
Quote
runcmd: Resolving main menu command: Playback/DSP/Settings
No available command found
runcmd: Resolving main menu command: Preferences/Playback/DSP Manager
No available command found

Run Command

Reply #28
Perhaps I should have re-read what I wrote earlier in this thread:
  • 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.

Is the first command a real main menu command?

Run Command

Reply #29
OK, the preferences command was just a misleading example which I didn't use anyway. But the other command. Yes, the first command is in the main menu if you have foo_menu_addons installed. It worked before and I don't see a reason why your plugin now doesn't find it. The only change I see is the upgrade to the new vc++ redist.

Run Command

Reply #30
Meanwhile I had my windows restarted: Problem is solved. 

Run Command

Reply #31
Is there anyway to add a directory of music to the current playlist using this plugin?
Like this:
foobar2000.exe /runcmd="File/Add Directory" "D:\Cat Power"


If not how are people adding music usign the command line?

Thanks,
Ben


Run Command

Reply #33
Hi,

i just installed this plugin and i also want to use it activate the shpeck plugin for mildrop visualisations but it doesn't work.
Somehow the menu items the shpech plugin adds to the visualisations sub-menu aren't seen by the run command.
The title of the subitems is fairly long but maybe when you match on keywords it could work.

example of submenu items added to visualizations submenu
shpeck - stop
shpeck - start 'Milkdrop 2.0c / Milkdrop 2.0c'

maybe a command like /runcmd="v//start milkdrop" should use the keywords 'start' and 'milkdrop' to identify the submenu.
if that should work all menu items could be called in similair fashion.

Run Command

Reply #34
The component currently does not recognize dynamic submenus correctly. I have already added this in the source code, but need to find some time to prepare a proper release.

Run Command

Reply #35
I try to change tab with:
foobar2000.exe /runcmd="View/Switch to playlist/Mp3"
but it not work
"View/Switch to playlist/Mp3" is in toolbar and not in menu.
do it have a via to select a tab with this component?

Run Command

Reply #36
Could you add
"e.g. ReplayGain/Scan selection as albums (by tags)"
to
"ReplayGain/Scan selection as albums (by tags-EXIT)" means exit foobar2000,if finished scan
or
"/runcmd=Exit/ReplayGain/Scan selection as albums (by tags)"?

Right now I use foo_scheduler and input any time
How do you think?



Run Command

Reply #37
The component currently does not recognize dynamic submenus correctly. I have already added this in the source code, but need to find some time to prepare a proper release.


has this point changed in any way since 2010? because this sentence sounds like the answer of my question, why my DSP-Preset-runcmd is not working...

i try to access following DSP Preset: "C:\Program Files\foobar2000\foobar2000.exe /runcmd="Playback/DSP settings/Fade Off" without any luck!
it's accessible via keyboard shortcut, but not via foo_runcmd or foo_run ("C:\Program Files\foobar2000\foobar2000.exe /command:"Fade Off")

i need to switch DSP-Presets via commandline, because i use it in scheduler.
and it is not possible to use the built-in fade, because i use edcast-DSP, so volume control and fade do not work for the streaming-DSP.

is there any chance of help, for switching between dsp-presets?
or do i have to use the melomane's "workaround" http://www.hydrogenaudio.org/forums/index....showtopic=58898

thx in advance, greetz, dls

Run Command

Reply #38
I'm looking to create a batch file so I can run it via a shortcut to add the currently playing song to a preset playlist without having to manually do that. Run Command along with the playlist command component appear to be what I need. Here's what I have so far:
foobar2000 /runcmd-playing=Copy
foobar2000 /playlist-activate:"bookmark"
foobar2000 /runcmd-playlist=Paste
foobar2000 /playlist-activate#playing

The problem is that the third line to paste the copied song doesn't work. Looking into this more closely, I can't even find any "paste" command in the Foobar keyboard shortcut settings.
Am I missing something or doesn't Foobar include the required command?

I have version 1.3.3 .

I also tried to find a way to use the clipboard contents in a batch file (via nircmd) so I could run a "foobar /add" command for the file in question, but nircmd seems to only support the text content of the clipboard, which merely has the title and artist, but not the path to the song.

Any other suggestions to achieve what I'm looking for?

Thanks,
Sebastian

Run Command

Reply #39
You are right, there is no Paste command which can be used by foo_runcmd. However you can install foo_utils which has commands to add songs to another playlist (for example "Edit other/Add to Playlist/bookmark"). You can assign these commands to a keyboard shortcut in foobar2000 so there is no need for a batch file.

Run Command

Reply #40
You are right, there is no Paste command which can be used by foo_runcmd. However you can install foo_utils which has commands to add songs to another playlist (for example "Edit other/Add to Playlist/bookmark"). You can assign these commands to a keyboard shortcut in foobar2000 so there is no need for a batch file.

Great, thanks for the super fast reply and pointing me in the correct direction. Still need the batch file as I couldn't find a way to apply a shortcut to the currently playing song without having to manually focus it in the playlist that's currently playing. However in connection with run command, it basically just takes this command:
foobar2000.exe /runcmd-playing="Edit Other/Add to Playlist/bookmark"

For good measure, I also threw in this command:
foobar2000.exe /playlist-activate#playing
to focus the current playlist (as the add command doesn't seem to work if you're in a different playlist).

With autohotkey, I set up a global shortcut with the windows key and to avoid the batch console window from opening each time I use the shortcut, I'm using the Hidden Start tool.

Still needs some testing, but seems solid on first glance so I can now have a playlist running and bookmark any song without having to switch to foobar.

Run Command

Reply #41
... I couldn't find a way to apply a shortcut to the currently playing song without having to manually focus it in the playlist that's currently playing.
There is a "[context / now playing]" section on the keyboard shortcuts preferences page for this very purpose. It is the last root item in the action window after "[main]", "[context]" and "[context / playlist]", so it helps to collapse these items.

Run Command

Reply #42
There is a "[context / now playing]" section on the keyboard shortcuts preferences page for this very purpose. It is the last root item in the action window after "[main]", "[context]" and "[context / playlist]", so it helps to collapse these items.

That's super - works great! Collapsing all the items is really useful to see what's available. Thanks so much.

Run Command

Reply #43
Is there any way to change dsp chain presets with this plugin or change dsp chains when I change the playback order to "shuffle" etc some other way??

Run Command

Reply #44
I do not believe that this component can automatically run dsp chain preset commands in response to changing the playback order if I understand what you wish to do correctly.


You can automatically do it simply with wsh panel mod with something like the code below. You will need to enter your own DSP chain preset names.
Code: [Select]
// NEW: Called when playback order is changed
// new_order_index:
//      0 - "Default"
//      1 - "Repeat (Playlist)"
//      2 - "Repeat (Track)"
//      3 - "Random"
//      4 - "Shuffle (tracks)"
//      5 - "Shuffle (albums)"
//      6 - "Shuffle (folders)"
function on_playback_order_changed(new_order_index)
{
    if (new_order_index == 4)
{
        fb.trace("shuffle preset")
        fb.RunMainMenuCommand("Playback/DSP settings/YOUR PRESET NAME")
    }
    else
{
        fb.trace("other preset")
        fb.RunMainMenuCommand("Playback/DSP settings/DIFFERENT PRESET NAME")
    }
}

Run Command

Reply #45
DSP presets can already be changed using the menu or keyboard shorts cuts. While this component provides means to access menu commands interactively and via the command line, it does not provide automation or scripting features.

Run Command

Reply #46
I'm trying to use foo_run for setting keyboard shortcuts to apply ratings with foo_quicktag but I don't know what the parameters are. Here's what doesn't work:

(keep in mind i'm using linux, hence the wine; as this is the only way to set global shortcuts)

Code: [Select]
wine "/home/jj/.wine/drive_c/Program Files (x86)/foobar2000/foobar2000.exe" /runcmd="1"

Code: [Select]
wine "/home/jj/.wine/drive_c/Program Files (x86)/foobar2000/foobar2000.exe" /runcmd="/1"

Code: [Select]
wine "/home/jj/.wine/drive_c/Program Files (x86)/foobar2000/foobar2000.exe" /runcmd="//1"

Code: [Select]
wine "/home/jj/.wine/drive_c/Program Files (x86)/foobar2000/foobar2000.exe" /runcmd="///1"


through Foobar2000's keyboard it's nested under:

[context] / Tagging / Quick Tagger / Set <Rating> to / 1

here's an image, from thsi I can't even tell what's the parameters to set a specific rating #


**UPDATE**
The proper way to find out the command parameters for foo_run is through "Right-Click Selection(s) > Run Command... Dialog Window" like so:


Run Command

Reply #47
Glad you solved it! You had me confused there for a minute because you mentioned foo_run which is a separate plugin. It allows the user to execute arbitrary commands on the command line from within foobar2000 so in a sense it is the inverse of foo_runcmd.

Note that context menu commands require the use of the /runcmd-playlist or /runcmd-playing command line switches. You can also check the foobar2000 console for information how the foo_runcmd plugin resolved your command name.

Run Command

Reply #48
@ Foosion, great component, I am just having a problem getting replaygain scanning to work.

This is a batch script.
Code: [Select]
CD /d "C:\program files (x86)\foobar2000\"
start foobar2000.exe /command:"select all" /command:"select all" /command:"remove" /add "d:\desktop\audio" /runcmd-playlist="ReplayGain/Scan per-file track gain"


Fb2k opens, clears the current playlist, and populates the playlist but then sits there.  I have tried all sorts to invoke replaygain scanning, but it won't have it.  I did try firstly using "/context_command:" but that did nothing too.

Any idea what I am missing here?

Thanks

Run Command

Reply #49
^ Update, I sorted it.  It's me not understand quite what I am doing with CLI and batch.  Your component works flawlessly.

The fix is to have each action on a separate line, with a delay/pause - trying to RG scan an unpopulated playlist just isn't going to happen, give it a little time.

 
SimplePortal 1.0.0 RC1 © 2008-2019