Re: How to deal with Asynchronous Finder operations
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