Open CS5-Omachi opened 1 year ago
@CS5-Omachi
Comparison operators === and == doesn't work with ID objects in UXP scripting. This is documented at https://developer.adobe.com/indesign/uxp/guides/migrating-to-UXPScript/
Please instead use equals()
method.
Below code should get it working
if (doc.documentPreferences.pageOrientation.equals(PageOrientation.LANDSCAPE))
I wrote the following code. This works with both UXPScript and ExtendScript.
ExtendScript hits the first condition, but UXPScripting does not. So I created a second condition, which is rather inconvenient.