Hi oh wize ones,

I have a question about perl Tk (perl 561, tk800.024).
I want to make a radio player that runs mplayer url sites from a mysql database. I have already made the framework, and I am able to do almost everything. One thing I still cannot do is this:

I open a MainWindow/TopLevel with all the possible stored radio urls from mysql. Than I click on one and this starts mplayer.To do this I launch mplayer with a fork + exec. And in the mean time, I open a new TopLevel just a button that the specific radio is playing.

Now my question: When the mplayer command exits or abords, the TopLevel button still shows running as I run mplayer with an exec, and there is no feedback to the Tk window.

How can I deal with this?

Is there a Tk module that allows one to fork a new process (with system or exec or whatever) and that shows in the mean time a window it is running, and closes the window when it is finnished. It would even be nice to have a kill method to?

I looked at Tk::IO etc.. But I have no clue how to use it.

I hope my question is clear enough.
---------------------------
Dr. Mark Ceulemans
Senior Consultant
IT Masters, Belgium


In reply to tk player with system/exec by mce

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.