新規ドキュメントを開いて、オブジェクト(テキスト文字)を作成する。
(cs3サンプルを参照して作成。)
var thisDoc = app.documents.add( DocumentColorSpace.RGB ); pointTextName(); pointTextAdd(); pointTextPhone(); function pointTextName() { // Point Text var pointTextName = thisDoc.textFrames.add(); pointTextName.contents = "名前"; pointTextName.top = 150; pointTextName.left = 100; applyTextFormats(pointTextName); } function pointTextAdd() { // Point Text var pointTextAdd = thisDoc.textFrames.add(); pointTextAdd.contents = "名古屋市千種区"; pointTextAdd.top = 150; pointTextAdd.left = 200; applyTextFormats(pointTextAdd); } function pointTextPhone() { // Point Text var pointTextPhone = thisDoc.textFrames.add(); pointTextPhone.contents = "000-000-0000"; pointTextPhone.top = 170; pointTextPhone.left = 200; applyTextFormats(pointTextPhone); } function applyTextFormats(thisText) { thisText.spacing = 10; thisText.paragraphs[0].justification = Justification.LEFT; thisText.textRange.characterAttributes.size = 14; }
0件のコメント