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


References: 
 >Re: How to deal with Asynchronous Finder operations (From: Matt Neuburg <email@hidden>)
 >Re: How to deal with Asynchronous Finder operations (From: kai <email@hidden>)

  • Prev by Date: Entourage question
  • Next by Date: Re: How to do some AppleScript inside a Perl program to label duplicates
  • 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