Why won't the trash empty?
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/