InDesign CS2 convert clipping paths to varnish layer

topic posted Tue, April 10, 2007 - 11:20 AM by 
-- ID CS2 Clipping Path to Varnish Plate
-- 2007 Ray Massie & Chad Augur
-- with much help from macscripter.net and page-online.de forums



tell application "Adobe InDesign CS2"

set myDoc to active document

tell myDoc

try
make layer with properties {name:"Varnish"}
end try

set theLinks to every link

repeat with i from 1 to count of theLinks

set parentID to id of parent of item i of theLinks
set oldPath to clipping path of image id parentID

if the clipping type of oldPath is photoshop path then
set oldGraphic to parent of item i of theLinks
set newGraphic to duplicate oldGraphic
set properties of newGraphic to {item layer:"Varnish"}

set newpath to clipping path of graphic 1 of newGraphic
tell newpath
set convertPath to convert to frame
end tell

set properties of convertPath to {fill color:"Magenta"}
delete graphic 1 of convertPath

end if

end repeat

end tell

end tell
posted by:

Recent topics in "AppleScript"

Topic Author Replies Last Post
Script looking for internet explorer? Pink 3 September 2, 2007
applescript tutorials at macscripter.net 1 March 25, 2007
close all open applications 0 September 28, 2006
make HTML link from selection 0 May 13, 2006
find a creator 0 February 7, 2006