フレームサイズの取得
var frame = app.activeDocument.selection[0]; var y = frame.visibleBounds[0]; //左上 y var x = frame.visibleBounds[1]; //左上 x var y1 = frame.visibleBounds[2]; //右下 y1 var x1 = frame.visibleBounds[3]; //右下 x1
[VBScript]
Set app = CreateObject("InDesign.Application") Set frame = app.activeDocument.selection(1) y = frame.visibleBounds(0) '左上 y x = frame.visibleBounds(1) '左上 x y1 = frame.visibleBounds(2) '右下 y1 x1 = frame.visibleBounds(3) '右下 x1
※参考
現在のフレームサイズから縦サイズ+10mm変更の場合
frame.visibleBounds = [ frame.visibleBounds[0],frame.visibleBounds[1],frame.visibleBounds[2]+10,frame.visibleBounds[3] ];
[VBScript]
frame.visibleBounds = Array( frame.visibleBounds(0),frame.visibleBounds(1),frame.visibleBounds(2)+10,frame.visibleBounds(3) )