Like this:
AppleScript
set theWindowTitle to "PerlMonks" set theOption to text returned of (display dialog "Enter a Source fold +er:" & return default answer "" with title theWindowTitle) set thePerlScript to quoted form of (POSIX path of ((choose file with +prompt "Select a script:") as Unicode text)) set theResult to do shell script thePerlScript & " -S " & theOption display dialog "Result: " & theResult with title theWindowTitle
Perl
#!/usr/bin/perl use strict; use warnings; use Getopt::Long; Getopt::Long::Configure("ignore_case"); my %options; GetOptions(\%options, "SourceFolder=s"); print $options{SourceFolder};
Update: see also Getopt::Long
Regards, Karl
«The Crux of the Biscuit is the Apostrophe»
In reply to Re: How to create GUI for a perl script on MAC?/Apple Script and Perl?
by karlgoethebier
in thread How to create GUI for a perl script on MAC?/Apple Script and Perl?
by hary536
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |