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

Re: [MacPerl] Apple Events without parameters



on 10/21/99 18:04, Chris Nandor at pudge@pobox.com wrote:

>> My script is supposed to be a simple modification of the example in the
>> macperlcat.pod (posted below).  All I want to do, for now, is just to launch
>> Internet Explorer.  The relevant event description from aete.converter is:
> 
> You can't do that.  After an app is launched, it is sent the oapp event.
> To merely launch an app, you can tell the Finder to open it, or use
> Mac::Processes (or Mac::Apps::Launch for a simpler interface).

Thanks for your rapid and helpful answers.  The key for me was
Mac::AppleEvents::Simple (I like simple!).

However, I still am curious about your statement above.  Although you say I
can't directly launch my app, the script below does just that.  Why is this?

-Rick

#!perl -w

use Mac::AppleEvents;
use Mac::AppleEvents::Simple;

 %ae = (
 target => 'MSIE',# creator ID
 class=> 'aevt',# event class
 id=> 'oapp'# event ID
);

do_event($ae{'class'}, $ae{'id'}, $ae{'target'});
die $^E if $^E;


# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org