A few comments:
First, regarding your program's output. Proc::Killfam.pm has the following lines (14 and 15):
# We need Proc::ProcessTable to work properly. If it's not available, # then we act like Perl's builtin kill() command.
The first line of your output is simply an FYI warning. Thus, it is not the reason your program is not working. Rather, the second line
Can't call method "ExecuteCommand" on an undefined value at D:\...\exe +c.pl line 1.
which has nothing to do with the first line, is why it fails. There is a coding error in the example you are trying to run. Since you haven't posted it, we cannot tell you what it might be.

Second, Proc::ProcessTable does work under Windows, but you need to have cygwin install. The following is from the Readme file bundled with the Proc::ProcessTable module:

"Please note that the windows port requires the Cygwin environment to work".

If you want cygwin, you can get it here

Third, from the Tk::ExecuteCommand manpage, the primary purpose of Tk::ExecuteCommand is to provide non-blocking program execution. Yet it still provides the functionality you want. That is, you can still use it if you want to redirect program output to a window. However, it will only work with output that typically goes to a console window (like the dos dir command). Try the following code (modified from the manpage):
use Tk; use Tk::ExecuteCommand; my $mw = MainWindow->new; $ec = $mw->ExecuteCommand( -command => '', -entryWidth => 50, -height => 10, -label => '', -text => 'Execute', )->pack; $ec->configure(-command => 'dir'); $ec->execute_command; $ec->bell; $ec->update; MainLoop;
Or, you can take that part of Tk::ExecuteCommand that handles the output redirection and use it as a basis for a custom-made solution.

davidj

In reply to Re: TK::ExecuteCommand by davidj
in thread TK::ExecuteCommand by vikee

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.