Last active
November 8, 2016 03:57
-
-
Save milligramme/409009d37621531e47f53e88738e26bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@target "indesign" | |
$.writeln(app.version); | |
var doc = app.documents.add(); | |
app.scriptPreferences.measurementUnit = MeasurementUnits.MILLIMETERS; | |
var tf = doc.textFrames.add({geometricBounds:[10,10,50,100]}); | |
var tbl = tf.tables.add({bodyRowCount:4, columnCount:4}); | |
var c = tbl.columns[0]; | |
var i = 2; | |
while (i-=0.0001) { | |
try { | |
c.width = i; | |
} | |
catch(x_x){ | |
$.writeln(i); | |
$.writeln(x_x); | |
break; | |
} | |
if(i < 0){ | |
break; | |
} | |
}; | |
app.scriptPreferences.measurementUnit = AutoEnum.AUTO_VALUE | |
/* | |
7.0.4.553 | |
2.03951683016082e-13 | |
エラー: セットのプロパティ 'width' の値が無効です。予想される値は Unit ですが、値 0.0 を受け取りました。 | |
*/ | |
/* | |
9.3.0.106 | |
1.0583000000001 | |
エラー: セットのプロパティ 'width' の値が無効です。予想される値は Unit ですが、値 1.0583000000001037 を受け取りました。 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment