Hello-
I was hoping someone could help me out with printing multiple InDesign documents to a specific printer with settings specific to all docs. I’d like to have a hotfolder set up so that 20-30 docs could be dropped into it, open each doc individually, print, then close the doc before opening the next. Any help is appreciated - thanks!
hey dude,
u can play around with this (without engagement):
this is a droplet maybe for indesignCS2 docs only ?!?. drop your files and select printer and printstyles.
global OptionsVar, tmpPrintStyle
on ProcessAFileList(aFileList)
repeat with aFile in aFileList
tell application "Finder"
set runVar to (file type of aFile = "IDd4")
end tell
if runVar = true then
if OptionsVar = false then
set tmpPrintStyle to my getPrintOptions()
my printFile(aFile, tmpPrintStyle)
else
my printFile(aFile, tmpPrintStyle)
end if
else
tell application "Finder" to activate
tell application "Finder" to display dialog "Document: " & name of aFile & " is no InDesignCS2 Document!" with icon 2
end if
end repeat
end ProcessAFileList
on open of fileList
-- wichtige infos anzeigen
set click to {" Cancel ", " OK "}
set retValue to (display dialog "All Pics and Charsets OK? Colormanagement OK?" buttons click default button 2 giving up after 10)
set myButton to button returned of retValue
if myButton = first item of click then error number -128
if gave up of retValue = true then error number -128
set OptionsVar to false
ProcessAFileList(fileList)
end open
on getPrintOptions()
tell application "Adobe InDesign CS2"
set tmpPrintStyle to name of every printer preset
set tmpPrintStyle to (choose from list tmpPrintStyle with prompt "Print-Style?") as string
set tmpPrintStylePrinter to printer of printer preset tmpPrintStyle
log tmpPrintStylePrinter
set tmpPrinter to printer list of printer preset tmpPrintStyle
set tmpPrinter to (choose from list tmpPrinter with prompt "Printer?" default items tmpPrintStylePrinter) as string
log tmpPrintStyle
log tmpPrinter
set printer of printer preset tmpPrintStyle to tmpPrinter
get printer of printer preset tmpPrintStyle
end tell
set OptionsVar to true
return tmpPrintStyle
end getPrintOptions
on printFile(aFile, tmpPrintStyle)
set aFile to aFile as string
tell application "Adobe InDesign CS2"
set csVersion to version
if csVersion = 3 then
set user interaction level to never interact
else
set user interaction level of script preferences to never interact
end if
activate
try
close every document
end try
try
open file aFile
on error
tell application "Finder"
display dialog ("Cannot open " & name of alias aFile as string)
return
end tell
end try
delay 5
with timeout of 600 seconds
print document 1 using (tmpPrintStyle as string) --without print dialog
end timeout
if csVersion = 3 then
set user interaction level to interact with all
else
set user interaction level of script preferences to interact with all
end if
close document 1 saving no
end tell
end printFile
greets from
TMA
apparently the script will work for CS2, but not for CS3 nor CS4.
Is there anyone who can tell me what I need to change in this script to be able to use it for the latest versions of InDesign?
grtz,
Model: MacbookPro
Browser: Safari 523.12.2
Operating System: Mac OS X (10.5)
change:
set runVar to (file type of aFile = "IDd4")
into:
set runVar to (file type of aFile = "IDd5")
but first you must define a print style (printer preset) in InDesign
Greets from
TMA