我尝试通过 indesign 运行我的 javascript 代码,但出现错误:MODAL DIALOG OR ALERT IS ACTIVE。
谁知道如何解决这个问题?
#target "InDesign"
w = new Window ('dialog');
magicButton = w.add ("button", undefined, "Buttton");
magicButton.onClick = main
w.show ();
function main(){
var myDocument = app.activeDocument
myDocument.viewPreferences.horizontalMeasurementUnits =
MeasurementUnits.PIXELS;
myDocument.viewPreferences.verticalMeasurementUnits =
MeasurementUnits.PIXELS;
}