in reply to Give me my gui back!

I think the Tk::ExecuteCommand module is what you might want. Try running the following script and see if you get ideas.
#!/usr/bin/perl -w use Tk; use Tk::ExecuteCommand; use Tk::widgets qw/LabEntry/; use strict; my $mw = MainWindow->new; my $ec = $mw->ExecuteCommand( -command => '', -entryWidth => 50, -height => 10, -label => '', -text => 'Execute', )->pack; $ec->configure(-command => 'date; sleep 10; date'); $ec->execute_command; MainLoop;

Replies are listed 'Best First'.
Re: Re: Give me my gui back!
by Bagarre (Sexton) on Nov 18, 2003 at 19:28 UTC

    Tk::ExecuteCommand is not in my package.

    I'm using ActivePERL 5.8.0 and Tk 800.024

    I saw it mentioned in Mastering Perl/Tk but, they built their own module in the book.

    Does that code work on your box? Where can I get Tk::ExecuteCommand?

    -David

      Tk-ExecuteCommand is available through PPM for ActivePerl on Windows.

      It doesn't help you since it sounds look you need to parse the output from the command. The important part is the fileevent call which setups an event handler for non-blocking IO from the handle. The handle can be a pipe to a sub-command. I think this is describe in the "Mastering Perl/Tk" book.

Re: Re: Give me my gui back!
by Anonymous Monk on Nov 19, 2003 at 10:41 UTC
    This won't work on windows
Re: Re: Give me my gui back!
by Anonymous Monk on Nov 19, 2003 at 10:44 UTC
    This will still freeze the gui on windows, not very useful at all.