Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use launchd to replace folder actions' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use launchd to replace folder actions
Authored by: squawbrah on Apr 23, '08 05:44:11PM
Nice hint. I discovered two things when I tried it out:

1) You should probably use WatchPaths instead of QueueDirectories to prevent an endless loop and also (I think) eliminate the problem with .DS_Store files.

When I tried a simple folder action--making a file's label turn red when put in the target folder--with QueueDirectories, my CPU use jacked way up and never came down. Using WatchPaths instead solved the problem.

2) You can call an AppleScript directly--instead of having a shell script call an AppleScript--by putting this in your .plist file:

<key>Program</key>
<string>/usr/bin/osascript</string>
<key>ProgramArguments</key>
<array>
<string>osascript</string>
<string>/Users/foo/path/to/myscript.scpt</string>
</array>

Lots more info at http://www.afp548.com/article.php?story=20050620071558293

--Thanks



[ Reply to This | # ]