in reply to creating simple GUI
#!/usr/bin/perl use strict; use Tk; use Tk::ProgressBar; # make window my $mw = new MainWindow(); # tell MainWindow to execute this function after 1000 milliseconds $mw->after(1000,\&MyUpdate); # or tell MainWindow to execute this sub repeatedly $mw->repeat(1000,\&MyOtherUpdate); MainLoop; sub MyUpdate { # ... start something? } sub MyOtherUpdate { # ... update window, reset progress bar? }
Untested!
PS If you use the progress bar, you must remember to update the window (via $mw->update())
|
|---|