Script stops working but produces no error

I wrote this script over a year ago. It continues to work on other boxes it is installed on in my department. While writing another script the other day the interaction between Illustrator and Finder stopped. When i ran this old script which I know works, it failed on my box as well but produced no runtime error messages.

set fileTypes to {“EPSF”, "PDF ", “ART5”, “AI”} – file types available to resave as Illustrator

– get a sourceFolder that holds the files to resave as AI
set sourceFolder to (choose folder with prompt “Choose a folder with files to resave as Illustrator:”) as text

– get a list of files of the defined type in the sourceFolder
tell application “Finder” to set workingFiles to (every file of folder sourceFolder whose file type is in fileTypes) as alias list
– now you have your fileList argument

– get a destinationFolder to hold the AIs
set destinationFolder to (choose folder with prompt “Choose a folder to hold the Illustrator files:”) as text

SaveFilesAsEPS(workingFiles, destinationFolder)

on SaveFilesAsEPS(fileList, destinationFolder)
set destinationPath to destinationFolder as string
repeat with aFile in fileList
tell application “Finder” to set fileName to (name of aFile)
set newFilePath to destinationPath & fileName
tell application “Adobe Illustrator”
activate
open aFile
convert to paths (every text frame of current document)
set epsOptions to {class:EPS save options, CMYK PostScript:true, embed all fonts:true, embed linked files:false, include document thumbnails:false, PostScript:level 3, preview:none}
save current document in file newFilePath as eps with options epsOptions
close current document saving no
end tell
end repeat
end SaveFilesAsEPS

Other scripts that only involve Illustrator still run from the scripts menu. Anyone know what I can do to restore the connection. Have tried deleting preference files and Zapping the PRAM. Ran disk utility which is returning alot of JAvaFramework permission errors errors. Could that be it?

Model: Mac Pro
AppleScript: 2.1.2
Browser: Firefox 3.6.12
Operating System: Mac OS X (10.6)

Hi
Just ran your code on a MacBook Pro, 10.6.4, CS5, tested some PDF’s works fine for me, try running YASU maybe.

YASU is a great app. However it doesn’t fix the issue either. You can imagine my frustration when I experienced the same thing you did. The script still works great on the Mac Pro 10 feet from me, but not on my box. It works on my MacBook pro but not on my tower. I wonder if I am going to have to reinstall the software. Anyone else experience anything like this?

Are you running the script from a hotkey (via Quicksilver, Launchbar, etc.)? Scripts will fail without a sound in these cases but if you run the script from File > Scripts inside AI then error dialogs will appear. (I use this all the time when one of my Users says, “It just doesn’t do anything!”)

Cheers,
Jim
BLUEFROG

Thank you for this suggestion! I’m rolling out tools soon and expect to have some bumps in the road.

NP! :slight_smile:

I’ve got this department hooked up with Quicksilver triggers for the various production scripts (which isn’t entirely bug free but it’s 99% and free) so there’s no user interaction on a graceful failure. I just remind them to run it from their File > Scripts menu and come back with a screencap or what the dialog said. (And they often feel good about themselves like, “Hey! I helped solve that problem!” :slight_smile:

Cheers and good luck!
Jim