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

Re: [MacPerl] Apple Events... More Examples Available?



Kent Cowgill <kentc@intersites.com> writes:
>AECreateAppleEvent( which would, I suppose, necessitate the need for
>AEDesc )

Yes.

>AEPutParam( if, in fact, it's analogous to AEPutParamPtr )

One of my (as yet unwritten) philosophical principles in translating toolbox
calls is that pointer/length pairs get combined into a single scalar
value, so the c function:

AEPutParamPtr(AE, 'duh?', 'TEXT', "Hello, World", 12)

in Perl becomes

AEPutParam(AE, 'duh?', 'TEXT', "Hello, World");

>I've successfully used AEBuildAppleEvent, but the application I'm
>trying to communicate with needs a few more parameters.
>
><fontfamily><param>Geneva</param><bigger>AEBuildAppleEvent CLASS, ID,
>ADDRESSTYPE, ADDRESS, RETURNID, TRANSACTIONID, FORMAT, PARMS,
>=2E...</bigger><smaller>=09
>
></smaller></fontfamily>
>
>but MacPerl complains about any additional parameters I try to use.=20
>Perhaps I'm misunderstanding what's expected as a parameter for the
>"PARMS=8A".

MacPerl does rudimentary checking that the number of arguments you supply
corresponds to the number of placeholders in FORMAT.

>I was wondering if anyone has done anything more complex using
>AppleEvents than the examples available in the Perl Anarchists Cookbook
>and would be willing to share their work/findings/suggestions.

Maybe Chris Nandor could help you out?

>  Kent Cowgill          .---'''''---...         1 West State Street
>  Intersites, Inc.      'i n t e r s i t e s.   Geneva, IL 60134

Geneva? Cool.

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
  "According to the Geneva Convention, I am only required to provide my
   name, rank serial number, and date of birth; however, if you promise
   not to break my fingers, I'll talk."