"Y100M100"のカラーがあるか調べ、なければカラーを作成、そのあとで線を作ります。塗りなしはfill color:"None"で指定できます。(InDesign2.0ではfill color:none)
tell application "Adobe InDesign CS2_J"
set LayObj to layer "LINE" of active document
set Ws to 0.2
set colName to "M100Y100"
set C to 0
set M to 100
set Y to 100
set K to 0
tell active document
try
set myCol to color colName
--変数myColにカラーオブジェクトを入れる
on error--失敗したら
set myCol to make color with properties ¬
{name:colName, color value:{C, M, Y, K}}
--変数myColにカラーオブジェクトを作る
end try
end tell
tell page 1 of active document
make graphic line with properties ¬
{geometric bounds:{"12 mm", "10 mm", "109 mm", "10 mm"}, ¬
fill color:"None", stroke color:myCol, stroke weight:Ws, ¬
item layer:LayObj}
--ライン作成。塗りがなしはfill color:"None"
--2.0ではfill color:none
end tell
end tell
コメントする