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

Re: [MacPerl] AppleEvent help?



Alan Fry writes:
> The following satisfactorily counts the lines in a BBEdit window:
> [snip AE stuff]
> However it fails with MacPerl. So far as I can see, 'cnte' is not included
> in the 'core' events for MacPerl.

Snooping around with some of Apple's AE tools, I saw "core\cnte" in MacPerl, I
believe. And when I looked at the SCPT resource created from a compiled
AppleScript like:

   tell application "MacPerl"
      count lines in window 1
   end tell

I see "core\cnte" in there. Again, I'm working in the dark when it comes to
AppleEvents, so maybe I am misinterpreting this, but it looked like MacPerl
could count lines. But I'm glad to know I'm not the only one who can't figure
this out...

> There also seems to be a problem with MacPerl in that the reply 'hangs up'.
> For instance, the 'clos' script above works perfectly if kAEWaitReply is
> replaced by kAENoReply. If it isn't, the script times out, and _then_ the
> window closes. I find this with a 68K/7.5.1/5.1.3r2 and a PPC/8.0/5.1.4b2.

Yeah, I found that but figured I was doing something wrong and not telling
MacPerl that it was talking to itself. When I made a dummy copy of MacPerl and
sent the events to it, though, it returned properly.

-dan


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