[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Simple Open Dialog



jason white <slf9y@cc.usu.edu> writes Tue, 24 Nov 1998 14:50:39 -0600:

>Thanks!  Did not know that!  I am working on getting it for myself.
>Reading it will be my next major miracle ;-)  In the mean time, I've got
>MacPerl pushing Apple Script to do the dialog for me.
>
>#!perl
>
>$show_dialog    = "tell application \"Finder\"\n";
>$show_dialog.=          "activate\n";
>$show_dialog.=  "try\n";
>$show_dialog.=  "set file1 to choose file with prompt \"Select a file:\"\n";
>$show_dialog.=  'on error -- e.g. user cancelled' . "\n";
>$show_dialog.= "return\n";
>$show_dialog.= "end try\n";
>$show_dialog.= "end tell\n";
>
>MacPerl::DoAppleScript($show_dialog);

Have I missed something? Will not 'MacPerl::Choose()' do what you want (see
macperl.pod)?

#!perl
require 'GUSI.ph';

$f = MacPerl::Choose(GUSI::AF_FILE(), 0, "");
print "$f\n";

Alan Fry





***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch