At 4:15 PM -0700 6/1/01, Noah Hoffman wrote:
>Does anyone know how to programmatically empty the trash with MacPerl?
Yes. Use AppleScript.
>Applescript doesn't give permission.
That doesn't make much sense. Are you running under OS 9, in a
multiple user environment? If so, change the permissions of the
logged in user so they *can* empty the trash. I don't think there's
anything that MacPerl can do to give a user permissions they don't
have. Or at least, there *shouldn't* be.
Or try sending the raw AppleEvents, instead of using AppleScript.
Or try using unlink to delete your files, instead of move them to the trash.
Or try installing a script in the startup items folder to empty the
trash the next time the machine is rebooted. Or the login items
folder (or whatever it's called). I wouldn't recommend the logout or
shutdown items folders, as activating the finder in those cases can
interrupt the action being taken (rebooting, shutting down, loging
out, etc...).
-Jeff Lowrey