#Loop through all of the drill layers GUI.... my $exitbutton = $mw->Button(-text=>'Exit',-command=> sub { &Exit },-font=> $fontname,-activebackground => "red")->pack(-pady=> '0.1c',-side => 'bottom'); $balloon->attach($exitbutton, -msg => "Exit the program",-balloonposition => 'mouse'); my $helpbutton = $mw->Button(-text=>'Help',-command=> sub { &Help },-font=> $fontname,-activebackground => "#999900")->pack(-side =>'bottom',-pady=> '0.1c'); my $create = $mw->Button(-text=>' Create 9 hole ',-command=> sub { &add_ldi},-font=> $fontname,-activebackground => $doitcolor)->pack(-side=>'left',-expand=>1,-fill=>'none',-pady=> '0.1c',-padx=>'0.3c'); $balloon->attach($create, -msg => "Add LDI coupons to the checked off layers",-balloonposition => 'mouse'); my $combine = $mw->Button(-text=>'Combine',-command=> sub { &combine_ldi},-font=> $fontname,-activebackground => $doitcolor)->pack(-expand=>1,-fill=>'none',-side => 'right',-pady=> '0.1c'); $balloon->attach($combine, -msg => "Split the center hole to a mechanical drill layer, and option to add coupons to more layers",-balloonposition => 'mouse'); my $skip = $mw->Button(-text=>'Skip',-command=> sub { &skip_drill},-font=> $fontname,-activebackground => "yellow")->pack(-expand=>1,-fill=>'none',-side => 'right',-pady=> '0.1c'); $balloon->attach($skip, -msg => "Skip the current drill layer",-balloonposition => 'mouse'); my $status=$mw->Button(-text=>'Status',-command=> sub { &status_gui},-font=> $fontname,-activebackground => "#9966CC")->pack(-expand=>1,-fill=>'none',-side => 'right',-pady=> '0.1c'); $balloon->attach($status, -msg => "View summary of script actions",-balloonposition => 'mouse'); $mw->withdraw; #avoid the jumping window bug $mw->Popup; $drillinfoadded = "No"; MainLoop; #Exit the script if $feedback equals Destroy! exit 0 if $feedback eq "Destroy!"; } #The exit button in $mw was clicked sub Exit { $feedback = "Destroy!"; $mw->destroy(); } #The skip button in $mw was pushed sub skip_drill() { push(@statusinfo," "); push(@statusinfo,"$currentdrill Skipped"); $feedback = "Skip"; $mw->destroy(); }