Re: Monitoring a folder
Re: Monitoring a folder
- Subject: Re: Monitoring a folder
- From: JollyRoger <email@hidden>
- Date: Wed, 03 Jan 2001 10:19:01 -0600
on 1/3/2001 8:48 AM, Chad Gray at email@hidden wrote:
>
Can you have an applescript monitor a folder?
Yes.
Easy way (with some limitations):
Write a folder action script that processes the files when dropped on the
open folder. The catches here are that the folder must be open for drops to
be detected by the folder action script. You can use a nifty little
extension called Folder Actions plus to detect drops when the folder is
closed. But note that the folder *cannot* detect drops from remote users.
Only drops on the local machine are detected.
Harder way (without above limitations):
Write a stay-open application with an idle handler that checks the contents
of the folder. Have a IN folder where new files are dropped, and an OUT
folder where processed files are placed by the script. If new items are
detected in the IN folder, have the script copy them to a temporary folder,
process them there, and then move them to the OUT folder.
>
Like when a user creates a folder and adds images to the folder the
>
applescript launches photoshop and resizes the images?
PhotoShop does not contain built-in AppleScript support like most
applications. You have to pay somewhere around of $300 to get AppleScript
support in PhotoShop. Said AppleScript support comes in the form of a
plugin called PhotoScripter.
Instead of forking over the big bucks and making your script rely on
PhotoShop, you can use the free scripting addition Akua Sweets "scale image"
command to resize your images (and do lots of other stuff with images).
Akua Sweets lets you use QuickTime to manipulate images, so it supports any
format supported by QuickTime. Check it out - you'll like it
HTH
JR