nick2307
asked on
How to Show Error Message pop-up window in Perl?
Hi..
I am working on ne script....that will create a .csv file as a output and copy that file to a network drive.
If the drive is not there...it mount that drive and copy that file...
I want to put something in there....that will pop-up the error message if the files are not copied due to some reason and then continue with the program.
As this script is called by another program, if I use die command it will stop there...instead I want to show error-message pop-up windiw....so user know that files are not copied...
Please advise....
I am working on ne script....that will create a .csv file as a output and copy that file to a network drive.
If the drive is not there...it mount that drive and copy that file...
I want to put something in there....that will pop-up the error message if the files are not copied due to some reason and then continue with the program.
As this script is called by another program, if I use die command it will stop there...instead I want to show error-message pop-up windiw....so user know that files are not copied...
Please advise....
What OS will the script be running on?
#!/usr/bin/perl
use strict;
use Tk;
use Tk::Dialog;
my $mw = MainWindow->new(); #Create object
$mw->withdraw(); #Don't display main window
my $response = $mw->messageBox(
-icon => 'question',
-message => 'Hello World!',
-title => 'My title',
-type => 'AbortRetryIgnore',
);
print "response=$response\n";
use strict;
use Tk;
use Tk::Dialog;
my $mw = MainWindow->new(); #Create object
$mw->withdraw(); #Don't display main window
my $response = $mw->messageBox(
-icon => 'question',
-message => 'Hello World!',
-title => 'My title',
-type => 'AbortRetryIgnore',
);
print "response=$response\n";
If you will only be on Win32, there is a win32 only module. The above will work on windows or unix.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.