• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Wait Until Process Completion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wait Until Process Completion


  • Subject: Re: Wait Until Process Completion
  • From: "Mark J. Reed" <email@hidden>
  • Date: Tue, 13 May 2008 09:26:44 -0400

Mark>  repeat
Mark>     delay 1
Mark>     try
Mark>       do shell script "ps -p" & pid
Mark>     end try
Mark>     if the result doesn't contain pid then exit repeat
Mark>  end repeat

Well, that works, but not quite the way I intended:

93:99: execution error: The variable result is not defined. (-2753)

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

  • Follow-Ups:
    • Re: Wait Until Process Completion
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Wait Until Process Completion (From: Luther Fuller <email@hidden>)
 >Re: Wait Until Process Completion (From: "Mark J. Reed" <email@hidden>)
 >Re: Wait Until Process Completion (From: Christopher Nebel <email@hidden>)
 >Re: Wait Until Process Completion (From: "Mark J. Reed" <email@hidden>)
 >Re: Wait Until Process Completion (From: Axel Luttgens <email@hidden>)
 >Re: Wait Until Process Completion (From: "Mark J. Reed" <email@hidden>)
 >Re: Wait Until Process Completion (From: Luther Fuller <email@hidden>)
 >Re: Wait Until Process Completion (From: KOENIG Yvan <email@hidden>)
 >Re: Wait Until Process Completion (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Wait Until Process Completion
  • Next by Date: Re: Simple newbie question
  • Previous by thread: Re: Wait Until Process Completion
  • Next by thread: Re: Wait Until Process Completion
  • Index(es):
    • Date
    • Thread