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

[MacPerl] Simple Open Dialog



>At 14.26 -0500 1998.11.24, jason white wrote:
>>Perusing through the pod with my MacPerl, I noticed under dialog manager
>>that...
>>
>><snippet>
>>Access to Inside Macintosh is essential for proper use of these functions.
>>Explanations of terms, processes and procedures are provided there. Any
>>attempt to use these functions without guidance can cause severe errors in
>>your machine, including corruption of data. You have been warned.
>></snippet>
>>
>>I don't have that access.
>
>Everyone does have that access (well, most everyone).  IM is on Apple's
>site in HTML and available for download as PDF files.
>
>--
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);

Any way to have them share variables...namely the path name that is
returned in the AS function?  Looking at the on-line book hasn't turned up
any results thus far. I've thought of having AS push it to the Clipboard
and MacPerl getting it from ther (the path that results), but don't want to
go there quite yet.
Thanks for the help with finding IM...never knew I could be priveleged to
such ;-).  Any other suggestions are appreciated.

Jason



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