How to do some AppleScript inside a Perl program to label duplicates
How to do some AppleScript inside a Perl program to label duplicates
- Subject: How to do some AppleScript inside a Perl program to label duplicates
- From: pete boardman <email@hidden>
- Date: Fri, 16 Sep 2005 13:47:35 +0100
Anyone know how to run a bit of AppleScript from inside a Perl
script? I found a neat Perl script which finds duplicate files. It
prints each set of duplicate files out on the terminal like this:
--
/Users/pete/projects/a/doc1.doc
/Users/pete/projects/a/backup1/doc1.doc
/Users/pete/projects/a/backup2/doc1.doc
--
plus information about their size. What I'd like to do is label these
files in the Finder. But that probably means inserting some
AppleScript into the Perl program. I can do the AppleScript bit:
--
tell app "Finder" to set the label index of f to 6
--
and I know where in the Perl file is the loop that prints out the
pathnames of the duplicate files:
--
for (@{$pair{$i}}) {
print $$_,"\n";
}
--
All I need to know now is how to combine them: I want to set the
label of the file $$_ (I think - Perl has more punctuation than I can
cope with.)
thanks
Pete
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden