テキストにいろいろな設定をします。Illustrator10ならtext frameをtext art itemに変えて記述してください。
set pt to 2.83464
set Q to 0.25 * pt
tell application "Adobe Illustrator"
tell document 1
set mySelObjList to selection--選択されたオブジェクトを調べる
repeat with mySelObj in mySelObjList--選択分繰り返す
if class of mySelObj is text frame then--もしtext frameなら
tell mySelObj
--プロパティを調べる
get properties of character 1
--内容を変更する
set contents to "あいうえお" & return & "かきくけこ"
--フォントを変える
set text font of characters 1 thru 5 to ¬
text font "Osaka" of application "Adobe Illustrator"
--サイズを変える
set size of characters 1 thru 5 to 13 * Q
--ベースラインシフト
set baseline shift of character 1 of paragraph 1 to 2
--横変倍
set horizontal scale of character 1 of paragraph 1 to 200
--縦変倍
set vertical scale of character 2 of paragraph 1 to 200
--カーニング
set kerning of character 2 of paragraph 1 to -300
--塗り
set fill color of character 3 of paragraph 2 to ¬
{cyan:0, magenta:50, yellow:100, black:0}
--線幅
set stroke weight of character 3 of paragraph 2 to 0.2
--線の色
set stroke color of character 3 of paragraph 2 to ¬
{cyan:0, magenta:100, yellow:100, black:0}
--テキストフレームの幅を変更(長体がかかる)
--これを行うと線幅等が消えてしまう要注意
set width to 10 * pt
end tell
end if
end repeat
end tell
end tell
コメントする