Re: Wait Until Process Completion
Re: Wait Until Process Completion
- Subject: Re: Wait Until Process Completion
- From: KOENIG Yvan <email@hidden>
- Date: Tue, 13 May 2008 15:47:50 +0200
Le 13 mai 2008 à 15:35, Mark J. Reed a écrit :
As I have no Leopard machine today, I can't test.
I will comment the Luther's code.
repeat
delay 1
try
do shell script "ps -p " & pid
(* when we are here no error was encountered, so we may code:
if the result doesn't contain pid then exit repeat *)
if the result doesn't contain pid then error
on error
(* OK, I forgot the case when the do shell script generates an error *)
exit repeat
end try
end repeat
So this one would work sparing some cycles ;-)
repeat
delay 1
try
do shell script "ps -p " & pid
if the result doesn't contain pid then exit repeat
on error
exit repeat
end try
end repeat
Yvan KOENIG (from FRANCE mardi 13 mai 2008 15:46:40)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden