#159 Get play state / position

open
None
6
2005-12-11
2005-12-04
tomas
No

Hello,
I´d like to control MPC by a Delphi-application.
Most work I can realize with sendkeys.
But that´s still missing:

I am not able to get information about the play
position and the play state (end of file).

- What could I try?
- Is there any kind of an interface, I could contact?
- could anybody build in the generation of a semaphor
which transmits the filelenght and actual position?

Tomas.

Discussion

  • tomas

    tomas - 2005-12-11
    • priority: 5 --> 6
     
  • tomas

    tomas - 2005-12-11
    • assigned_to: nobody --> schultz_
     
  • tomas

    tomas - 2005-12-11

    Logged In: YES
    user_id=1011242

    please help me!

     
  • florian-klein

    florian-klein - 2006-05-26

    Logged In: YES
    user_id=1529371

    I have the same question... please help us!!

     
  • eriksonn

    eriksonn - 2006-08-05

    Logged In: YES
    user_id=1569017

    I am also trying to find out, how to get from mpc status and
    which song is playing. There is written how to control it
    thorugh http, but I don't know how to get informations from mpc?

     
  • tomas

    tomas - 2006-08-08

    Logged In: YES
    user_id=1011242

    Hi,
    my workaround is to get the the first childwindow-handle of
    mpc - and then trying to read the playing-time.
    This value is put in a static control, even if "status" is
    not displayed.

    GetWindowText(childwin, TheText, 255);
    s:= thetext;
    p:= pos('/',s);
    s_all:= copy(s,p+2,255);s_now:= copy(s,1,p-1);
    if length(s_now) > 4 then begin
    x_now:= strtosec(s_now);
    x_all:= strtosec(s_all);
    end:

    end_of_play is reached, as far as x_now is equal to x_all

    I think, you could read the songtitle in a similar way.
    Good luck,
    Tomas.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks