Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you prevent the "Update Links" dialog to appear when opening documents from code?

I'm trying to Update Links of inDesign documents using ExtendScript, but whenever I open the document the dialog appear asking me if I want to update the link.

I want to do it in the background, so is there a way to prevent this or any dialog from showing?

Thanks

like image 641
Eric B. Avatar asked Dec 11 '22 14:12

Eric B.


2 Answers

I have found a solution for this particular dialog. This prompt can be disabled from the UI, but also, as with other setting of the application, you can also do in the code.

So here is what I implemented.

//Save the current application setting.
var currentAppSettings = {checkLinksAtOpen: app.linkingPreferences.checkLinksAtOpen};

//Set the value to false to prevent the dialog from showing.
app.linkingPreferences.checkLinksAtOpen = false;

//do some stuff ...

//Set the value back to its original value.
app.linkingPreferences.checkLinksAtOpen = currentAppSettings.checkLinksAtOpen;
like image 82
Eric B. Avatar answered Dec 14 '22 04:12

Eric B.


There is a setting in InDesign for checking links. What if you modified the default settings in InDesign? Perhaps if you uncheck "Check Links Before Opening Document" it will bypass the dialogue.

enter image description here

like image 36
bgmCoder Avatar answered Dec 14 '22 02:12

bgmCoder