• 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
Why won't the trash empty?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why won't the trash empty?


  • Subject: Why won't the trash empty?
  • From: Patrick Wynne <email@hidden>
  • Date: Sun, 17 Dec 2000 12:21:31 -0800 (PST)

Hi folks,

I've written this script as a stay-open app and everything works
fine...except the trash doesn't get emptied! If I run it from as a
regular script from the editor to test it (no handlers, etc) it works
fine. So, any idea what's up?

--begin script------------

global startTime

on run
set startTime to current date
end run

on quit
set p to path to apple menu

tell application "Finder"
set recDocs to folder "Recent Documents" of p
set stuff to items of recDocs
repeat with thing in stuff
if creation date of thing > startTime then
delete thing
end if
end repeat

empty trash --> this doesn't execute!

end tell

continue quit
end quit

--end script------------

The only difference in my test script is that the main logic of the
quit handler is not in a handler and I supply a value for startTime
myself.

Help!

Thanks,

Patrick Wynne
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/


  • Follow-Ups:
    • Re: Why won't the trash empty?
      • From: Bryan <email@hidden>
  • Prev by Date: Re: applescript-users digest, Vol 2 #140 - 12 msgs
  • Next by Date: Re: Why won't the trash empty?
  • Previous by thread: Re: applescript-users digest, Vol 2 #140 - 12 msgs
  • Next by thread: Re: Why won't the trash empty?
  • Index(es):
    • Date
    • Thread