2010-05-01から1ヶ月間の記事一覧

[InDesign JavaScript] 色(スウォッチ)を作成する

var myColor = app.activeDocument.colors.add({name:"C=20 M=100 Y=80 K=10", model:ColorModel.process, space:ColorSpace.CMYK, colorValue:[20, 100, 80, 10]}); .colors.add({ name:"C=20 M=100 Y=80 K=10", //色の名前 model:ColorModel.process, //カ…

[InDesign JavaScript] テキストフレームの連結(リンク)解除

myTextFrameA.nextTextFrame = NothingEnum.nothing; myTextFrameA.previousTextFrame = NothingEnum.nothing;

[InDesign JavaScript] テキストフレームの連結(リンク)

var myFrameA = app.activeDocument.textFrames.add({geometricBounds:[0, 0, 50, 50]}); var myFrameB = app.activeDocument.textFrames.add({geometricBounds:[0, 60, 50, 110]}); var myFrameC = app.activeDocument.textFrames.add({geometricBounds:[0,…

[InDesign JavaScript] 選択しているオブジェクトを反転させる

例)水平方向に反転させる var myScaleMatrix = app.transformationMatrices.add({horizontalScaleFactor:-1}); app.activeDocument.selection[0].transform(CoordinateSpaces.pasteboardCoordinates, AnchorPoint.TOP_LEFT_ANCHOR, myScaleMatrix);例)垂直…

[InDesign JavaScript] 選択しているオブジェクトにシアーを適用する

例)左下を支点に30度(右倒れ)のシアーを適用する var myShearMatrix =app.transformationMatrices.add({clockwiseShearAngle:30}); app.activeDocument.selection[0].transform(CoordinateSpaces.pasteboardCoordinates, AnchorPoint.BOTTOM_LEFT_ANCHO…

[InDesign JavaScript] 選択しているオブジェクトを回転させる

例)左肩を支点に27度反時計回りに回転させる var myRotateMatrix = app.transformationMatrices.add({counterclockwiseRotationAngle:27}); app.activeDocument.selection[0].transform(CoordinateSpaces.pasteboardCoordinates, AnchorPoint.TOP_LEFT_AN…

[InDesign JavaScript] 選択しているオブジェクトを拡大・縮小する

例)縦横1.5倍に拡大する var myScaleMatrix = app.transformationMatrices.add({horizontalScaleFactor:1.5, verticalScaleFactor:1.5}); app.activeDocument.selection[0].transform(CoordinateSpaces.pasteboardCoordinates, AnchorPoint.centerAnchor…

[InDesign JavaScript] 選択しているオブジェクトを複製する

例)同じ位置に複製します app.activeDocument.selection[0].duplicate();例)複製と同時に相対値で移動もできます app.activeDocument.selection[0].duplicate(undefined,[12,12]);

[InDesign JavaScript] オーバーフローしているテキストフレームを探す(探して表示するだけ。表組みは除く)

(function (){ for(i=0;iグループ化されてるテキストフレームは無視されるので修正予定です。

[InDesign JavaScript] 指定したページを表示する

例)2ページ目を表示する。 app.activeWindow.activePage = app.activeDocument.pages.item(1);

[InDesign JavaScript] 選択しているアイテムを整列させる(等間隔に分布 編)

例(水平方向に等間隔に分布、マージンに揃える) app.activeDocument.distribute(app.activeDocument.selection,DistributeOptions.HORIZONTAL_SPACE,AlignDistributeBounds.MARGIN_BOUNDS,false); distribute( ItemObject, DistributeOpsions [, AlignDist…

[InDesign JavaScript] 選択しているアイテムを整列させる(オブジェクトの分布 編)

例(水平方向中央を基準に分布、マージンに揃える) app.activeDocument.distribute(app.activeDocument.selection,DistributeOptions.HORIZONTAL_SPACE,AlignDistributeBounds.MARGIN_BOUNDS,false); distribute( ItemObject, DistributeOpsions [, AlignDi…

[InDesign JavaScript] 選択しているアイテムを整列させる(オブジェクトの整列 編)

例(上揃え、選択範囲に揃える) app.activeDocument.align(app.activeDocument.selection,AlignOptions.TOP_EDGES,AlignDistributeBounds.ITEM_BOUNDS,false); align( ItemObject, AlignOptions [, AlignDistributeBounds, useDistributeMeasurement, absol…