-- 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
-- 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