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: Christopher Nebel <email@hidden>
- Date: Mon, 19 Sep 2005 11:26:12 -0700
On Sep 18, 2005, at 5:27 PM, kai wrote:
On 16 Sep 2005, at 16:34, Matt Neuburg wrote:
One possibility (I have not tried this) might be to loop with a
delay and
see whether the trash is in fact empty yet...? m.
I recently suggested (elsewhere) something like this:
----------------
tell application "Finder" to tell trash
empty
repeat until (count items) is 0
delay 0.2
end repeat
end tell
display dialog "Trash is empty."
----------------
Works in Tiger - but evidently not in Panther...
I should point out that the fact that the Finder doesn't wait in the
first place should be considered a bug. With certain exceptions,
like "play" in iTunes and DVD Player, scripting commands should not
return until they're done doing whatever it is that they do. I could
have sworn this was mentioned in the Scripting Interface Guidelines,
but I can't find it. I just filed a bug to fix that.
--Chris Nebel
AppleScript and Automator Engineering
_______________________________________________
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