[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Finder.pm -- make alias?



Thought I'd spend a little holiday free time playing with
the finder glue.  No luck so far.


I'm trying to do the equivalent of this applescript:

tell application "Finder"
	make new alias at folder "Macintosh HD:" to folder "Other HD:"
end tell


This perl script doesn't work:
#!perl

use Mac::Glue::Finder;
my $obj = new Mac::Glue::Finder;

$obj->make(
	new => $obj->o('class' => 'alias'),
	at => $obj->o(folder => 'Macintosh HD:'),
	to => $obj->o(folder => 'Other HD:')
);
__END__

No alias is created and there are no error messages.  The
'label_and_beep.plx' test script that comes with the glue works,
so I'm pretty sure everything is installed correctly.

I'm feeling pretty clueless.  Haven't been able to get a clue
from the pod docs in Finder.pm nor Glue.pm nor Chris' web pages
on the glue.  CaptureAE reports the following event sent to the
finder:
Process("Finder").SendAE "core,crel,'----':null(Ç6E6577È)"
Also not enlightening.


How do I tell the Finder glue to create an alias?
If you can answer that one, how did you figure it out?

Although I'm primarily interested in learning the glue, are there
some other ways to create aliases that don't involve scripting
AppleEvents?  (e.g. mkdir() but for aliases -- or some mac
equivalent of `ln -s ...`).

Thanks for your help.
-Eric

help@visionlink.org



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch