Enfocus Switch and indesign Script (JavaScript CS5.5)
I was on here last night asking for help with a center all images/graphics code and got terrific feedback.
Now I have a new problem with the same scrpit, Below is a script that I wrote for relinking broken links. It works like a champ exept when the orignal image/graphic is not the same size of the existing new link. So I added a new part to the code (what i had help with last night) I have bolded the sectioin.
When I run the scrpit in Indd everything works great. But, when I run the script throught Enfocus Switch the program stalls
AnyIdeas or sugestions are greatly appreciated.
//////Code Starts Here//////////
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
var docs = app.documents;
for (var i = 0; i < docs.length; i++) {
UpdateAllOutdatedLinks(docs);
}
function UpdateAllOutdatedLinks(doc) {
for (var d = doc.links.length-1; d >= 0; d--) {
var link = doc.links
if (link.status == LinkStatus.linkOutOfDate) {
link.update();
}
}
}
app.activeDocument.pages.everyItem().rectangles.everyItem().images[0]. fit(FitOptions.CEN TER_CONTENT);
//////// Code Ends Here ////////