Hello Monks! I humbly request your assistance.

I am just learning TK and I have not been able to find a comprehensive source of information (I'm planning on buying a book tomorrow).

Here's what I'm working on, I am desinging a script to act as a control panel which can monitor, start and stop certain scripts that I want running on my machine. I have gotten the raw gui designed, I have the start and stop buttons designed.

What I can't figure out is the monitor widget. I want a block/widget/button that will show red when a specific script is not running and green when the script is running. I can design a subroutine that can do a "ps -ef|grep" and determine if the script is running, but how do I have the little subroutine running all the time and updating the widget so that it gives a visual display of the background script's status?


THANX! for any help you can give! -Kevin

In reply to Tk process monitoring by K_M_McMahon

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.