i have found better solution to this and my other needs ...
it's called
AutoHotKey. you can set it up to do all kinds of things, like alt+drag to move window around, disable some win-key shortcuts (like win+u, win+e, win+f ...) or map them to different actions.
my show / hide action for foobar (for 0.9.x version) is like this (together with some other easy hotkeys shown as example):
CODE
Process, Priority,, High; Raise this script to high priority.
; ------------------------------------------------------------------------------
; disabled window-key shortcuts
#u::return
#^f::return
#e::return
#f1::return
; ------------------------------------------------------------------------------
; foobar2000 show / hide + style change
#f::
#h::
foobar_exe = C:\SEC\Audio\foobar2000 0.9\foobar2000.exe
Process, Exist, foobar2000.exe
foobar_pid = %ErrorLevel%
if (foobar_pid = 0) {
Run %foobar_exe%, , , foobar_pid
WinWait, ahk_pid %foobar_pid%
WinSet, Style, -0xC00000, ahk_pid %foobar_pid%
; WinSet, Redraw, , ahk_pid %foobar_pid%
} else {
IfWinExist, ahk_pid %foobar_pid%
{
Run %foobar_exe% /command:"activate or hide"
} else {
Run %foobar_exe% /command:"activate or hide"
WinWait, ahk_pid %foobar_pid%
WinActivate, ahk_pid %foobar_pid%
}
; Sleep, 200
} return
; ------------------------------------------------------------------------------
; default 'run' hotkeys
#s:: Run C:\Utils\System\Servant Salamander 2.5\SALAMAND.exe
#i:: Run C:\Program Files\Internet Explorer\IEXPLORE.EXE
#t:: Run C:\SYS\TV\WinFast\WFTVFM\WFTV.exe
#g:: Run C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.google.com
#^i:: Run C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.imdb.com
#w:: Run C:\Program Files\Internet Explorer\IEXPLORE.EXE http://en.wikipedia.org/wiki/Main_Page
#^!ScrollLock:: Run taskkill /F /IM oblivion.exe
all you have to do is download and install AutoHotKey (it's very easy on system resources - regarding gui/user objects etc.), change
foobar_exe = line to point to your foobar's installation, save this code to file with
ahk extension and run it.
win+f or win+h shortcut would start foobar (if not running) and make it title-less, it would toggle the window (show / hide) otherwise.
edit: improved the foobar's script. you can uncomment the line with "Sleep, 200" to put minimal 200ms delay between show / hide