単純に配置するだけなら下記で十分
set inputFile to "Macintosh HD:test.jpg" tell application "Adobe InDesign CS2_J" tell active document tell page 1 set EPSobj to place inputFile end tell end tell end tell領域を作っておきその領域に配置した後縮小する。
set inputFile to "Macintosh HD:test.jpg"
set X to 10
set Y to 20
set W to 50
set H to 60
set myPer to 70
tell application "Adobe InDesign CS2_J"
tell active document
tell page 1
set myRect to make rectangle at beginning with properties ¬
{geometric bounds:{Y, X, Y + H, X + W}, stroke weight:0, ¬
fill color:"None", stroke color:"None"}
--まずはボックスを作る
set EPSobj to place inputFile on myRect
--そのボックスに画像を入れる
tell EPSobj
set properties to {vertical scale:myPer, horizontal scale:myPer}
--画像のサイズを変更する
end tell
fit myRect given center content
--画像をセンターに入れる
end tell
end tell
end tell
コメントする