Re: Why won't the trash empty?
Re: Why won't the trash empty?
- Subject: Re: Why won't the trash empty?
- From: Bryan <email@hidden>
- Date: Sun, 17 Dec 2000 15:34:30 -0500
try
tell application "Finder" to empty
end try
>
From: Patrick Wynne <email@hidden>
>
Date: Sun, 17 Dec 2000 12:21:31 -0800 (PST)
>
To: email@hidden
>
Subject: Why won't the trash empty?
>
>
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/
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users