At 18:30 -0500 2001.06.01, Jeff Lowrey wrote:
>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.
It is very straightforward in Apple events/AppleScript/Mac::Glue.
#!perl -w
use Mac::Glue;
my $finder = new Mac::Glue 'Finder';
$finder->empty;
--
Chris Nandor [EMAIL PROTECTED] http://pudge.net/
Open Source Development Network [EMAIL PROTECTED] http://osdn.com/