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

Re: [MacPerl] HEEEEEELLLLLLPPPP!!!!!!



Alan Fry wrote:
> 
> Laurent Bardi wites Fri, 26 Sep 1997 22:55:53 +0200
> 
> >sorry, but i ve big,big pb!!!
> >
> >i don t understand
> >LC630 20 Mo sys 7.5.5 macperl 513r2
> >
> >this portion of script is for killing all the other apps running, she
> >has worked, and now se does nothing !!
> 
> I don't really understand your script, nor why it fails,  but I wonder if
> this simpler script might do what you want?
> 
> #!perl
> use Mac::Processes;
> use Mac::AppleEvents;
> 
> foreach $psn (keys %Process) {
>     $proc = $Process{$psn};
>     $sig = $proc->{processSignature};
>     if ($sig =~ /PFPI|MACS|McPL/) {next} # apps to keep running
>     else {quit($sig)}
> }
> 
> sub quit {
>     my $sig = shift;
>     #print $sig, "\n";
>     $evt = AEBuildAppleEvent(
>               'aevt', 'quit', typeApplSignature, $sig, 0, 0, ""
>            ) or die $^E;
>     $rep = AESend($evt, kAEWaitReply) or die $^E;
> 

it seems that AESend($evt, kAENoReply) is better , because macperl doesn
t wait for something...
(the alpha editor freeze this app)



>     AEDisposeDesc $evt;
>     AEDisposeDesc $rep;
> }
> 
> Alan Fry
thanks a lot Alan

-- 

Laurent BARDI Ingenieur Systemes & Reseaux 
Centre National de la Recherche Scientifique
INSTITUT  de PHARMACOLOGIE et de BIOLOGIE STRUCTURALE
Tel : 05-61-17-59-47             http://www.ipbs.fr/
Fax : 05-61-17-59-94             lolo@ipbs.fr
CNRS-IPBS 205 Route de Narbonne 31400 TOULOUSE FRANCE 

///////////////////////////////////////////////////////////////////////////
/ There is worse than to have not succeded
:                              /
/ Not to have  tried
!                                                    /
///////////////////////////////////////////////////////////////////////////

If it stinks, it's chemistry. If it moves, it's biology.
If it does not work, It's computer science.

Linux the choice of a GNU generation

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