in reply to How to create GUI for a perl script on MAC?/Apple Script and Perl?
If you can persuade the Wx module to install on your system (WxWidgets does work on Mac, so it should theoretically, and according to the CPAN testers service there are successful install reports from Mac OS X), then you could investigate my Ask module. It's as simple as:
use Ask qw( file_selection info ); my $file = file_selection("Please choose a file!"); info("You chose: $file");
Then Ask does the rest. If the user has run your script through the Mac terminal, Ask should detect this, and to input and output via the terminal. If they've launched your script by, say, double clicking it in Finder, it will notice there's no terminal and interact with the user via dialog boxes.
I do keep meaning to write a blogs.perl.org post about Ask.
Update: blog post written... Ask not what your user can do for you...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to create GUI for a perl script on MAC?/Apple Script and Perl?
by karlgoethebier (Abbot) on Jan 19, 2013 at 09:44 UTC | |
by Anonymous Monk on Jan 19, 2013 at 11:09 UTC | |
by karlgoethebier (Abbot) on Jan 19, 2013 at 11:49 UTC | |
by Anonymous Monk on Jan 19, 2013 at 12:20 UTC | |
by karlgoethebier (Abbot) on Jan 21, 2013 at 10:22 UTC | |
by Anonymous Monk on Jan 19, 2013 at 12:23 UTC |