My AS Leopard Woes Distilling PDFs

I’ve created a series of four AS plugins assigned to watched folders in Tiger to distill high and low res. PDFs. (Thanks StefanK for all your help!)

The first plugin (which works all of the time!) takes the PS file from the DTP app and renames and moves the file into Distillers “In” folders.

The second and third plugins (which work intermittently: either one or the other or neither and rarely, both) move the finished PDF files from Distiller’s “Out” folders to another folder and delete the PS files.

The fourth plugin compares the PDF files and moves them to the user’s Work folder.

All of these work without issue under Tiger and will work with Leopard if the scripts are run manually, just not as Folder Action plugins. I’ve read that folder actions are now automatically handled by Folder Actions Dispatcher but I don’t have a clue how to do this.

Here is the second script. (The third is just like it, except it points to another folder).

Any help would be appreciated. Thanks.

on adding folder items to this_folder after receiving added_items
	
	set posixPath7 to "/Users/Shared/Work/00_PDF_HI_RES/Out/"
	set HiResOutFolder to POSIX file posixPath7 as alias
	
	set posixPath9 to "/Users/Shared/Work/¢ Postscripts/PDF_Sandbox/"
	set PDF_Sandbox to POSIX file posixPath9 as alias
	
	set posixPath10 to "/Users/Shared/Work/"
	set workFolder to POSIX file posixPath10 as alias
	
	tell application "Finder"
		if (items of folder HiResOutFolder whose name extension is ("pdf")) exists then
			get (items of folder HiResOutFolder whose name extension is ("pdf"))
			get (first item of folder HiResOutFolder whose name extension is ("pdf"))
			move (first item of folder HiResOutFolder whose name extension is ("pdf")) to folder PDF_Sandbox with replacing
			delay 2
			delete ((items of folder HiResOutFolder) whose name extension is "ps")
			--Check for and move error log files to Work folder and warn user.
			if (items of folder HiResOutFolder whose name extension is ("log")) exists then
				get items of folder HiResOutFolder whose name extension is ("log")
				move (items of folder HiResOutFolder whose name extension is ("log")) to folder workFolder with replacing
				tell application "Finder" to activate
				display alert "An error has occurred generating the Hi-Res PDF file. 
 Please check the log file in the Work folder and remove any unprocessed files from the ¢ PostScripts and Distiller folders before retrying."
			end if
		end if
	end tell
end adding folder items to

Just a thought“do you have folder actions enabled in Leopard? By default folder actions are turned off so you have to manually turn them on if you want them to work. I assume you know this but you never know…

Yeah, they’re turned on.