Is there any way to create a similar plugin that renames or moves the currently playing file?
I use Autohotkey to do this. Basically it:
Makes sure the foobar window exists and is activated
Sends the shortcut to stop playback.
Sends the shortcut whatever "Context -> File Operations -> Move to" you want
Handles the dialog window for the move operation
Resumes playback
I then also have a similar hotkey to use foo_DeleteCurrent which works the same way, allowing you to delete/move the currently playing file, without foobar window currently in focus, resume playback. Optionally you could return focus to whatever program windows you previously had focused.
Here is a messy example that you would need to tweak for your configuation.
; ---- FOOBAR Move Playing Track to Library
^Numpad0::
SetKeyDelay, 10, 10
IfWinNotexist, %Foobar%
return
IfWinExist, %Foobar%
{
WinGet, current_ID, ID, A
previous_ID := current_ID
WinActivate
WinWaitActive, %Foobar%, , 2
if ErrorLevel
{
MsgBox, WinWait timed out (Foobar).
return
}
else
;BlockInput On
Send {NumpadDot}
Sleep,500
Send {Alt Down}
Send m
;Send {Numpad0}
Send {Alt Up}
WinWait, File Operation Preview, ,4
if ErrorLevel
{
MsgBox, WinWait timed out (File Operation Preview).
;BlockInput Off
return
}
Send {Space}
WinWaitClose
if ErrorLevel
{
MsgBox, WinWaitClose timed out (File Operation Preview).
;BlockInput Off
return
}
Sleep, 1000
SetKeyDelay, 10, 10
;ControlSend, , {Alt Down}{F11}{Alt Up}, ahk_class {97E27FAA-C0B3-4b8e-A693-ED7881E99FC1}
;Send {Delete}
Send {Numpad8}
;BlockInput Off
return
}
;BlockInp