DTP駆け込み寺

[ 返信 ]

Re: AS:InDesignに文字揃えが反映できない

以下、スクリプトです
tell application "Adobe Illustrator"
tell document 1
set getTextFrame to text frame 1
set getText to contents of text of getTextFrame as text ---テキスト抜き出し
set getFontFam to family of text font of character 1 of getTextFrame as text ---書体名
set getFontStyle to style of text font of character 1 of getTextFrame as text ---書体のウェイトなど
set getFontSiz to size of character 1 of getTextFrame as text ---文字サイズポイントで
set getGyokan to leading of text of getTextFrame as text ---行間をポイントで
set getJusti to justification of character 1 of getTextFrame as string ---文字揃え

tell application "Adobe InDesign CS5.5"

tell document 1
set newFrame to make text frame with properties {geometric bounds:{"0 mm", "130 mm", "15 mm", "240 mm"}, stroke color:swatch "None", fill color:swatch "None"}
tell newFrame ---抜き出した情報を設定していく
set contents to getText
set applied font of parent story to getFontFam
set point size of parent story to getFontSiz & " pt"
set leading of parent story to getGyokan & " pt"

if getJusti is "center" then ---文字揃え
set justification of parent story to center align
else if getJusti is "left" then
set justification of parent story to left align
else if getJusti is "right" then
set justification of parent story to right align
else
set justification of parent story to left align
end if ---文字揃えここまで

set vertical justification of text frame preferences to center align ---縦方向のそろえ

fit given frame to content ---フレームをフィットする
end tell ---抜き出した情報を設定していくおわり

end tell
end tell
end tell
end tell

[15724] やっすん (2013/06/19 Wed 14:34)


残り7件

  1. [15723] AS:InDesignに文字揃えが反映できない やっすん 2013/06/19 14:33
    1. [15724] Re: AS:InDesignに文字揃えが反映できない やっすん 2013/06/19 14:34
      1. [15733] Re^2: AS:InDesignに文字揃えが反映できない 小泉 2013/06/19 23:42
    2. [15725] Re: AS:InDesignに文字揃えが反映できない AM66 2013/06/19 18:06
      1. [15729] Re^2: AS:InDesignに文字揃えが反映できない やっすん 2013/06/19 19:02
      2. [15730] Re^2: AS:InDesignに文字揃えが反映できない (z-) 2013/06/19 19:07
        1. [15732] Re^3: AS:InDesignに文字揃えが反映できない 流星光輝 2013/06/19 21:39
    3. [15735] Re: AS:InDesignに文字揃えが反映できない やっすん 2013/06/20 09:37
      1. [15736] Re^2: AS:InDesignに文字揃えが反映できない 小泉 2013/06/20 12:54