$w{7}->add( 'progressbarlabel', 'Label', -x => -1, -y => 3, -width => 10, -border => 1, -text => "the time" ); $w{7}->add( undef, 'Label', -text => "The progressbar can be used to provide some progress information\n" . "to the user of a program. Progressbars can be drawn in several\n" . "ways (see below for a couple of examples). In this example, I\n" . "just built a kind of clock (the values for the bars are \n" . "depending upon the current time)." ); $w{7}->add( undef, "Label", -y => 7, -text => "Showing value"); $w{7}->add( 'p1', 'Progressbar', -x => 15, -y => 6, -showvalue => 1 ); sub progressbar_timer_callback($;) { my $cui = shift; my $COMMAND = "bash Script.sh $ARGUMENT1"; $w{7}->getobj('p1')->get(`$COMMAND`); } $cui->set_timer( 'progressbar_demo', \&progressbar_timer_callback, 1 ); $cui->disable_timer('progressbar_demo'); $w{7}->onFocus( sub{$cui->enable_timer ('progressbar_demo')} ); $w{7}->onBlur( sub{$cui->disable_timer ('progressbar_demo')} );