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

Re: [MacPerl] HELP!!!(appleevent+processess =kill?)



I was just pondering how to do they code myself ... you gave me the first
half, let me give you the rest.

#!perl -w
use Mac::AppleEvents;
use Mac::Processes;
&test1;
sub test1 {
        $a = GetCurrentProcess;
        while (($psn, $pi) = each %Process) {
                if ($pi->{processSignature} !~ /MACS|McPL/o) {

AESend(AEBuildAppleEvent('aevt','quit',typeApplSignature,$pi->{processSignat
ure},0,0,''),kAEWaitReply);
                }
        }
}


That should do the trick.  Although, I am downloading a 37MB file right now
and so this code is not fully tested.  :-)

--
Chris Nandor             pudge@pobox.com             http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])



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