InDesign 18.4 completely broke UXP-Scripts by removing globally available classes like "NothinEnum"
Whereas v18.3 worked completely fine, something in InDesign 18.4 broke the API.
Not even Adobes own "Getting started guide" works anymore.
Take this for example: "Setting up measurement units and master spread margins"
The code-snippet to copy will fail with an error "app is not available". in v18.3 and before, "app" was available globally
var myDocument = app.documents.add();
//Set the measurement units and ruler origin.
myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
myDocument.viewPreferences.rulerOrigin = RulerOrigin.pageOrigin;
To fix this first issue, you can import `app`manually like so:
const idd = require("indesign");
const app = idd.app;
var myDocument = app.documents.add();
//Set the measurement units and ruler origin.
myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
myDocument.viewPreferences.rulerOrigin = RulerOrigin.pageOrigin;This however will just fail with an error: "MeasurementUnits" is not defined.
The same problem occurs, if you try something like this, which has been working for years and is even referenced in Adobes own "Recipies", because "NothingEnum" is not available.
...
app.findGrepPreferences = NothingEnum.nothing;
...
So is there something I've missed in the patch-notes? Or worse, is this behavior intentional?? If the latter, you should update the aforementioned guides...
Hope you can fix this soon, until then we'll have to stick with v18.3
