Below is a script I’ve used in the past and just tried to run on a new computer… I got nothing as a result. It created the folders but never built the pdfs. I want to combine this with a find/replace script to do a bunch of changes to about 50 documents. I know I’ve used this before… why isn’t it working?
--http://bbs.applescript.net/viewtopic.php?p=31433
property done_foldername : "PDFs"
property originals_foldername : "Completed Files"
--on open theFiles
on open sourceFolders
repeat with sourceFolder in sourceFolders
--set sourceFolder to fullname of theFiles as Unicode text
--repeat with aFile in sourceFolders
tell application "Finder"
try
-- If you would like to include subfolders, you say - every file of entire contents of folder
set idFiles to (every file of folder sourceFolder whose file type is "IDd3") as alias list
on error -- work around bug if there is only one file
set idFiles to (every file of folder sourceFolder whose file type is "IDd3") as alias as list
end try
end tell
tell application "Finder"
if not (exists folder done_foldername of sourceFolder) then
make new folder at sourceFolder with properties {name:done_foldername}
end if
set the results_folder to (folder done_foldername of sourceFolder) as alias
if not (exists folder originals_foldername of sourceFolder) then
make new folder at sourceFolder with properties {name:originals_foldername}
set current view of container window of sourceFolder to list view
end if
set the originals_folder to folder originals_foldername of sourceFolder
end tell
if idFiles is not {} then
tell application "Adobe InDesign CS3"
set user interaction level to never interact
repeat with i from 1 to count of idFiles
open item i of idFiles
tell document 1
--LABEL FILES
set docName to full name as Unicode text -- name includes .indd should remove at some point
set clipPoint to offset of ".indd" in docName
set trimmedName to (characters 1 thru (clipPoint - 1) of docName) as string
--ACTIONS
with timeout of 1800 seconds -- 30 minutes
export format PDF type to trimmedName & "_press" & ".pdf" using "[Press Quality]" without showing options
end timeout
close without saving
end tell
end repeat
set user interaction level to interact with all
end tell
end if
return 10 -- try again in 10 seconds
end repeat
end open