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

Re: [MacPerl] Does MacPerl support Apple Events?



At 16.23 6/25/97, Joseph William Candelora wrote:
>Hi, I'm trying to write some CGI's to serve my Filemaker Pro database on the
>Web. I'm trying to find the best language to use, and I thought MacPerl looked
>good.  I need to know if it has the capability to use Apple Events to
>send and receive data to/from FMPro.  I have no idea how to use Apple
>Events to do this (I think it must be possible somehow); I just need to know
>if I should invest any time with MacPerl.

There are several ways to do it.  For starters, you can look at the Perl
Anarchist's Cookbook at:

ftp://www.iis.ee.ethz.ch/pub/neeri/MacPerl/Perl_Anarchists_Cookbook_10.sit.bin

Matthias Neeracher (MacPerl's porter/author) wrote it as an introduction to
various methods.

They break down into three categories that I can think of offhand.  One is
to use AppleScript straight from MacPerl.  This is probably best for those
times when you don't want to deal with MacPerl's AE syntax but you want the
flexibility Perl offers.  By putting AppleScript text in $script, you can
run it thusly:

        &MacPerl::DoAppleScript($script);

You can also control OSA languages from MacPerl with the Mac::OSA module.
I have no experience in this.

The third way is to use "raw" Apple Events.  This is described in some
detail in Matthias' Cookbook and in the docs for Mac::AppleEvents.  Also,
you can use my four modules at http://pudge.net/macperl/ as examples.  One
controls MacPGP 2.6.3, one is for Anarchie, one is for OT/PPP, and the
fourth (with Alan Fry) is for a utility called Progress Bar.  All these
materials could get you started on understanding what is involved.

Also, in September, I am expecting to be published in The Perl Journal.
The article is about Apple Events and MacPerl, with a bit of a tutorial on
how to get going.  If you can wait three months.  :-)

--
Chris Nandor                 pudge@pobox.com                 http://pudge.net/
%PGPKey=('B76E72AD',[1024,'08 24 09 0B CE 73 CA 10  1F F7 7F 13 81 80 B6 B6'])



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