--- In [email protected], "quantiworks" <quanticwo...@...> wrote:
>
> I found a script in the site cafe.naver.com/powerpro
> 
> http://cafe.naver.com/powerpro.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=2086
> 
> 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-BC\
> BE88F2A2A8}")
> 
> 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? 

Untried, but it looks like you would make a button for each of the actions and 
the commands entries would be:

.scriptn...@foobar_default_control("caption")
and so forth.

Since @Foobar_.. is the only label in the script, commands like this would also 
work:

.scriptname("caption")
.scriptname("stop")
.etc.

Regards,
Sheri

Reply via email to