Skip to main content
Topic: Query playing status from 3rd party program (Read 561 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Query playing status from 3rd party program

I understand the usual way would be writing a component plug-in and proactively send out the message to 3rd party app. But I'm looking for another simple way since I just want to query the title and playing time of the current playing. Does foobar2K support query playing status via normal windows messages? I only found some topics about control foobar2K via WM_COMMAND message. Is there any message available for querying playing status? Thanks!

WM_COMMAND:
Lparm : 394682
Wparm :
40051 = Previous
40009 = Play
40044 = Pause
40010 = Stop
40011 = Next
40060 = Random
40045 = Stop after current song
40008 = Exit foobar2000

Re: Query playing status from 3rd party program

Reply #1
Why so difficult? There's this component called foo_npsimple that dumps that info into a text file, and with a bit of title formatting you can even tell if Foobar is paused or stopped.

here's my formatting script (like the name of the component, it's very simple)
Code: [Select]
$if(%isplaying%,
$if(%ispaused%,
paused
,
playing
): $if($and(%artist%,%title%),%artist% - %title% )
$if($and(%title%,$not(%artist%)), %title% )
$if(%album%,from the album: %album%[ '('%date%')']),
stopped
)

It updates the info on track change, pause, stop and even every second if you so wish.

PS. there's similar components that sends the info to dedicated clients, so maybe that route is the answer, instead of querying Foobar create a little component that tells your program. Seeing as you're comfortable with Windows Messaging, tackling the FB2K SDK to whip up something for Foobar sending you that info shouldn't be that much of a hurdle?

Re: Query playing status from 3rd party program

Reply #2
Thanks for your idea! It does work for some non-real time scenario.

Re: Query playing status from 3rd party program

Reply #3
PS. there's similar components that sends the info to dedicated clients, so maybe that route is the answer, instead of querying Foobar create a little component that tells your program.

Can i please get the name of component?

 
SimplePortal 1.0.0 RC1 © 2008-2018