I have made an InDesign library to hold regularly used items. These items are of different sizes and are usually grouped items. I want to place these items on the page referencing the top left anchor of the group - using the x and y coordinates from the zero point.
I have a working (sort of) script but have only included a small snip hoping to illustrate my problem.
I can place asset on the page. I can move the grouped item on the page but the transform reference point is not in the right place. I want the point to be top left anchor. But the asset might come down as top right anchor positioning the asset in the wrong location. This is something I can do manually in the Control or Transform palette but cannot figure out how to move the item after placing it on the page using a different transform point.
– path to library file - temporary location
set tagsLib to (“CREATE_FLAT_MECH:ColorBarAndTags.indl”)
tell application “Adobe InDesign CS2”
activate
set newDoc to make document
tell active document
set properties of view preferences to {horizontal measurement units:millimeters, vertical measurement units:millimeters, show frame edges:false}
set properties of guide preferences to {guides shown:true}
set zero point of newDoc to {0, 0}
end tell
tell view zoom style of layout window 1 to fit page
tell newDoc
make new layer with properties {name:“TAGS & BARS”}
make guide with properties {orientation:vertical, location:100, item layer:layer “TAGS & BARS”}
make guide with properties {orientation:vertical, location:200, item layer:layer “TAGS & BARS”}
make guide with properties {orientation:horizontal, location:50, item layer:layer “TAGS & BARS”}
end tell
end tell
tell application “Adobe InDesign CS2”
if not (exists library “ColorBarAndTags”) then
set theFile to open tagsLib
end if
set active layer of active window to layer “TAGS & BARS” of newDoc
set asset4colorslug to place asset asset “4 COLOR SLUG” of library “ColorBarAndTags.indl” on newDoc
move asset4colorslug to {100, 50}
set asset4colorslugHor to place asset asset “4_COLOR_SLUG_HOR” of library “ColorBarAndTags.indl” on newDoc
move asset4colorslugHor to {200, 50}
end tell