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: Multiple actions in Keyboad Shortcuts (Read 5248 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Multiple actions in Keyboad Shortcuts

Hello,

Does anyone know a plugin that allow to run multiple actions from hotkeys?

Example:

ctrl+alt + F1:
Stop; Remove from playlist; Play next song.

It would be great if foobar had this powerful feature/plugin.

Thanks

Multiple actions in Keyboad Shortcuts

Reply #1
That is not possible. As far as i remember it should be possible to create a batch file with commandfile expressions. This file then could be invoked by foo_run. I never tried that so i can't tell you if that would work.

To achieve what you gave as example i anyway would give you the advice to use foo_playlistattributes: you can set that played/skipped files will be removed from playlist - so you only have to bind "next" to a hotkey.

Multiple actions in Keyboad Shortcuts

Reply #2
Hello,

Does anyone know a plugin that allow to run multiple actions from hotkeys?

Example:

ctrl+alt + F1:
Stop; Remove from playlist; Play next song.

It would be great if foobar had this powerful feature/plugin.

Thanks


I'd like to see this available as well.

 

Multiple actions in Keyboad Shortcuts

Reply #3
You can indeed do it with foo_run, as q-stankovic said. (Though you don't need an external batch file, you can just run the commands right from foo_run.) And foo_run's services are able to be bound to keyboard shortcuts.


preferences > tools > run services

[1] click "Add" button

[2] Label:
Rename the label from "New Service" to whatever you wish.

[3] Path:
cmd /c start "1" "C:\Program Files\foobar2000\foobar2000.exe" "/command:stop" & ping 127.0.0.1 -n 1>nul & start "2" "C:\Program Files\foobar2000\foobar2000.exe" "/command:remove" & ping 127.0.0.1 -n 1>nul & start "3" "C:\Program Files\foobar2000\foobar2000.exe" "/command:next"


(that path string is all one line). Adjust the foobar2000 program path as necessary.

note:
"ping 127.0.0.1 -n 1>nul", which just pings the localhost, is there to add a slight delay to allow commands to complete before the next is sent to foobar. If you still have an issue where all 3 commands do not execute, try increasing the number of pings by adjusting "-n 1" to a higher number (-n is the number of pings sent)