I found a script in the site cafe.naver.com/powerpro

http://cafe.naver.com/powerpro.cafe?iframe_url=/ArticleList.nhn%3Fsearch.clubid=10012786%26search.menuid=26%26search.boardtype=P

it controls some players like foobar2000 which I use, so far I've been 
controlling it using SendMessage (with MultiMedia keys enabled)
here's one example for "previous" track:
Window.SendMessage_("0x319",0x001f0204,0x000e0000,"c={E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}")

the above works but I'm curious about this one:
-------------------------------------------------------------------
@Foobar_default_Control
Local cmd
if (arg(1) == "caption") do
    quit(win.gettext(win.handle("=foobar2000")))
elseif (arg(1) == "stop")
    cmd = 40010 
elseif (arg(1) == "play")
    cmd = 40009 
elseif (arg(1) == "pause")
    cmd = 40044 
elseif (arg(1) == "random")
    cmd = 40060
elseif (arg(1) == "prev")
    cmd = 40051 
elseif (arg(1) == "next")
    cmd = 40011 
elseif (arg(1) == "open")
    cmd = 40049
else
    quit
endif

;if (arg(1) == "open")
;    win.show("=FOOBAR2000")

win.postmessage(win.handle("=foobar2000"),273,cmd,0)
    quit
-------------------------------------------------------------------

I think nahjegonn is the author but since the site is in korean even with a 
translator I don't get some of it.

Can someone explain me how do I use the above script in a bar with independent 
buttons?

Reply via email to