how do I set the ink properties (the angle, the dot shape, the frequency, etc.) using the print command in AppleScript? I am stumped…
pages 43 to 47 of the InDesignCS5_ScriptingGuide_AS should get you rolling
I sue the below put together from the ID scripting manual and with some help from here also, works great for me
----------------------------------------------------
-- PRINT AUTOMAGICALLY
----------------------------------------------------
--set PathToDesktop to path to the desktop as text
set PathToDesktop to "HotFolders:00:" as text -- PATH TO HOTFOLDER
tell application "Adobe InDesign CS5"
activate
tell active document
--First check if there are missing or modified images
set theLinkStatus to ((get status of every link) as string)
if ((theLinkStatus contains "link") or (theLinkStatus contains "lmis") or (theLinkStatus contains "lood")) then
with timeout of 9999 seconds
set Respond2Error to the button returned of (display dialog "Warning! You have missing or modified images." buttons {"Process Anyway", "Skip"} default button 1 with icon 1 giving up after 9990)
end timeout
if Respond2Error is "Skip" then
close saving no
return
end if
end if
--set horizontal measurement units of view preferences to inches
--set vertical measurement units of view preferences to inches
set horizontal measurement units of view preferences to millimeters
set vertical measurement units of view preferences to millimeters
tell document preferences
set pw to the page width
set ph to the page height
set document slug uniform size to true
set slug top offset to 0
end tell
set myName to (name of it) as text
set AppleScript's text item delimiters to {"."}
set fileBase to first text item of (myName as string)
set AppleScript's text item delimiters to {""}
set PS_file_path to (PathToDesktop & fileBase & ".ps") as text
tell print preferences
set printer to postscript file
set PPD to "BOBS PPD" -- put your PPD here
set print file to PS_file_path
set color output to inRIP separations
set trapping to off
try
set bleed chain to true
set bleed top to 0
end try
set use document bleed to print to false
set include slug to print to false
set all printer marks to false
set tile to false
set page position to centered
set print page orientation to portrait
set paper size to custom
set paper height to ph
set paper width to pw
set download PPD fonts to true
set screening to "175 lpi/2540 dpi"
set flip to none
set font downloading to complete
set OPI image replacement to false
--set PostScript level to level 3
set print layers to visible printable layers
set print nonprinting to false
set print spreads to false
set scale mode to scale width height
set scale height to 100
set scale width to 100
set scale proportional to true
set send image data to optimized subsampling
set sequence to all
end tell --end tell print prefs
end tell --end tell active doc
----------------------------------------------------
-- turn of certain colours
----------------------------------------------------
tell application "Adobe InDesign CS5"
activate
set theDoc to active document
set NopRINT to "Keyline" as text
set NopRINT1 to "Slug Blue" as text
try
if exists NopRINT then
set (print ink of ink NopRINT of theDoc) to false
end if
if exists NopRINT1 then
set (print ink of ink NopRINT1 of theDoc) to false
end if
on error
display dialog "no ink" as text
end try
end tell
----------------------------------------------------
--
----------------------------------------------------
display dialog ("Printing Separation") buttons "Printing" giving up after 1
with timeout of 1800 seconds
print active document without print dialog
end timeout
tell active document to close saving yes
end tell --End tell InDesign
----------------------------------------------------
-- PRINT AUTOMAGICALLY
----------------------------------------------------
hope that gets you going
thanks
any idea how this might be done in Illustrator as well? Our people use one or the other, depending…
not to familiar with illustrator printing scripts, you could have a look in the cs5 scripting manual
to see if that helps you out.
budgie