• 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: How to deal with Asynchronous Finder operations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to deal with Asynchronous Finder operations


  • Subject: Re: How to deal with Asynchronous Finder operations
  • From: Andrew Oliver <email@hidden>
  • Date: Thu, 15 Sep 2005 10:42:59 -0700

On 9/15/05 2:21 AM, "Kumar Shailove" <email@hidden> wrote:

> Hi list,
>
> Finder operations are asynchronous, i.e. if I execute the following
> script -
>
> tell application "Finder"
> empty trash
> display dialog "abc"
> end tell
>
> If the Trash is taking, say, 5 minutes to become empty, the dialog is
> displayed and the script execution completes. I want to wait until the
> statement in the first line has been executed (or more precisely I
> should say, the operation corresponding to this statement should be
> completed) and then only the script should proceed with the next
> statement(s). Any ideas ?

Use the standard Applescript 'ignoring application responses':

ignoring application responses
 tell application "Finder"
    empty trash
 end tell
end ignoring
display dialog "ABC"

Since you're ignoring the response of the Finder's empty trash command, the
rest of the script is free to proceed.

Andrew
:)

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to deal with Asynchronous Finder operations
      • From: deivy petrescu <email@hidden>
References: 
 >How to deal with Asynchronous Finder operations (From: "Kumar Shailove" <email@hidden>)

  • Prev by Date: Re: a numeric bug.
  • Next by Date: Get the "last" folder...
  • Previous by thread: Re: How to deal with Asynchronous Finder operations
  • Next by thread: Re: How to deal with Asynchronous Finder operations
  • Index(es):
    • Date
    • Thread