We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Applescript Spotlight Comments
Page Index Toggle Pages: 1
Applescript Spotlight Comments (Read 286 times)
Applescript Spotlight Comments
Jun 9th, 2008, 4:18pm
 
Hi all,

Has anyone succeeded in changing a files spotlight comments using applescript on OSX 10.5 with Java 1.5.0_13 from within Processing?

I've tried the following:


   String script =
   "tell application \"Finder\"" + "\n" +
   "set theFile to \"" + filename + "\"" + "\n" +
   "set locked of file theFile to false" + "\n" +
   "set owner privileges of file theFile to read write" + "\n" +
   "set group privileges of file theFile to read write" + "\n" +
   "set everyones privileges of file theFile to read write" + "\n" +
   "set comment of file theFile to \"foo\""+"\n"+
   "end tell";

Executing this script and any number of permutations does nothing, and I'm wondering if its possible
Re: Applescript Spotlight Comments
Reply #1 - Jun 9th, 2008, 6:07pm
 
for starters make sure you're using exec() instead of open():
http://processing.org/reference/open_.html
Page Index Toggle Pages: 1