Re: Wait Until Process Completion
Re: Wait Until Process Completion
- Subject: Re: Wait Until Process Completion
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 13 May 2008 09:35:42 -0400
On Tue, May 13, 2008 at 9:26 AM, Mark J. Reed <email@hidden> wrote:
> Sure isn't; the error means result never gets set. I think this is cleaner:
>
> repeat
> delay 1
> set theResult to ""
> try
> set theResult to do shell script "ps -p" & pid
> end try
> if theResult doesn't contain pid then exit repeat
But all things considered, I'd go with Luther's idea instead. No
extraneous variables.
repeat
delay 1
try
do shell script "ps -p " & pid
if the result doesn't contain pid then error
on error
exit repeat
end try
end repeat
--
Mark J. Reed <email@hidden>
_______________________________________________
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