Folder Actions Stopping

Hello,

We just updated to Leopard 10.5.8 from 10.4.11 at my office and now I am having problems with my Folder Actions. They continue to stop mid-process, or after processing a certain number of files. Generally, after processing 3 files the folder actions will just stop. Sometimes I can drag & drop one at a time and all will process. If I move all the files out of the folder than back in they will process 3 more (or so) than stop.

The Folder Actions (and their variants) take InDesign CS4 files and export them to a specified location as PDFs than either trash or keep the originals. I have no problems with this script on 10.4.11.

Even if I use a simple move-to-trash or a preset folder action from Apple the script stops after processing 3 or so files.

Also noteworthy, if I have the script open when I test a file and there is a stop, when I tell the script to compile and/or save is says “This document file has been changed by another application since you opened or saved it. Changes by other applications will be lost if you save. Save anyway?”

I can post the code if necessary, but I have seen the script process successfully on 10.5.8; it just stops from time to time.

Here’s my guess at your problem. In general if there’s an error in a script like yours it will just stop processing and shut the script down without alerting you of the error. So I’m thinking some error is creeping into your script after a few files are processed. Since you mention that the script works some times but no always, I’m thinking it could be a timing issue. In other words, some task is still completing while your script tries to run another task. This could cause an error and shut down the script as I explained. A possible solution, if this is your problem, would be to put some delay commands in your code. You’d have to figure out by trial and error where appropriate delays could be placed to solve the issue.

-- some command
delay 1 -- the seconds to delay
-- the next command