HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: tjacobs on 2011-06-07 16:10:36

Title: Multiple actions in Keyboad Shortcuts
Post by: tjacobs on 2011-06-07 16:10:36
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
Title: Multiple actions in Keyboad Shortcuts
Post by: q-stankovic on 2011-06-07 17:05:01
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.
Title: Multiple actions in Keyboad Shortcuts
Post by: roded on 2011-06-23 12:58:17
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.
Title: Multiple actions in Keyboad Shortcuts
Post by: trout on 2011-06-23 17:05:56
You can indeed do it with foo_run (http://www.hydrogenaudio.org/forums/index.php?showtopic=45223), 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 (http://en.wikipedia.org/wiki/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)