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

Re: [MacPerl] Get AETE



At 22:38 -0400 9/30/98, Chris Nandor wrote:
>OK, if we want to grab the aete data from extensions and plugins in the
>app, the best way is to grab the data with the Get AETE event.
>
>    use Mac::AppleEvents::Simple;
>    my $getaete = do_event('ascr', 'gdte', $appid, "'----':0");
>    my $aelist = AEGetParamDesc($getaete->{REP}, keyDirectObject);
>    foreach (1 .. AECountItems($aelist);
>        $aeteHandle = AEGetNthDesc($aelist, $_)->data;
>        # do stuff
>    }

There are other applications which need this, also...they are rather
specialized, usually.

One in ScriptDebugger...itself scriptable.  Normally, it "hides" its 'aete'
so as not to conflict with other applications.  It does this by not having
an 'aete' resource, but another type with the same contents.  If a
preference is set to show the dictionary, it responds to the GetAETE event
by sending out the other resource data.

AppleScript always uses GetAETE for running applications.  It only digs the
resource out by hand for those which are not running <and are on the same
machine, where it can "reach" the resource>.  There is a system handler
installed to catch the GetAETE event sent to those applications (most of
them) which don't handle the event themselves.

   --John



--
John Baxter   jwblist@olympus.net      Port Ludlow, WA, USA
Give a man a fish and you feed him for a day.  Teach him to fish,
and you get rid of him for the weekend.

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