• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to do some AppleScript inside a Perl program to label duplicates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to do some AppleScript inside a Perl program to label duplicates
      • From: Doug McNutt <email@hidden>
    • Re: How to do some AppleScript inside a Perl program to label duplicates
      • From: "Gary (Lists)" <email@hidden>
    • Re: How to do some AppleScript inside a Perl program to label duplicates
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Find text frame with active insertion point in InDesign?
  • Next by Date: Re: Folder Actions (System Events) failure
  • Previous by thread: Re: Find text frame with active insertion point in InDesign?
  • Next by thread: Re: How to do some AppleScript inside a Perl program to label duplicates
  • Index(es):
    • Date
    • Thread