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

[MacPerl] HEEEEEELLLLLLPPPP!!!!!!



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 !!

sub kill_all
{
	local($psn,$psi,$pi,$a,$desc,$event);
	$a = GetCurrentProcess;
 	while (($psn, $pi) = each %Process)
	{
  	if ((($pi->{processName} eq "Finder")&&($pi->{processType} eq
"FNDR"))||($pi->{processNumber} == $a))
  	{
			if ($pi->{processName} eq "Finder")
			{
					$PSNFINDER = $psn;
			}
	}
  	else
   	{				
    $desc = AECreateDesc(typeProcessSerialNumber,$psn);	
	$event =
AECreateAppleEvent(kCoreEventClass,kAEQuitApplication,$desc,kAutoGenerateReturnID,kAnyTransactionID);
	AEDisposeDesc($desc);
	AESend($event, nil,kAENoReply + kAENeverInteract + kAECanSwitchLayer,
kAENormalPriority,kAEDefaultTimeout);
	AEDisposeDesc($event);
	}
	}
	$psn = $PSNFINDER;
	$desc = AECreateDesc(typeProcessSerialNumber,$psn);	
	$event =
AECreateAppleEvent(kCoreEventClass,kAEQuitApplication,$desc,kAutoGenerateReturnID,kAnyTransactionID);
	AEDisposeDesc($desc);
	AESend($event, nil,kAENoReply + kAEAlwaysInteract + kAECanSwitchLayer,
kAENormalPriority,kAEDefaultTimeout);
	AEDisposeDesc($event);	
}


any help will be more than appreciated !!!!!

-- 

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