Indesign CS4: automate opening, updating files

I’m wanting to open up a bunch of CS4 Indesign docs to normailize them using known fonts and automatically updating links, if they need it. If it comes up on a link that is broken, of course it would stop. But the majority of my docs are just updates.

So I go searching through the Dictionary to see what options there are. I try a few, but I’m unable to get them to work and it seems they force a user interaction.

Looking around here, I’m getting the sense that there is no easy options. It seems I should attempt to turn the interactivity off and then iterate through the issues and make decisions.

Is that the consensus for this approach? thanx, sam

Opening and updating the links is possible, at least in CS3 and I can’t imagine that CS4 is any different. I’m not sure how easy it would be to handle the fonts, are you trying to replace one helvetica for another? Where is the list of fonts?

Handling the updating of links using the links routines in InDesign’s AppleScript dictionary:

tell application "Adobe InDesign CS4"
	tell document 1
		set linkList to every link
		repeat with aLink in linkList
			if status of aLink is link out of date then
				update aLink
			else
				if status of aLink is link missing then -- other options are normal/link out of date/link missing/link embedded
					--missing link handling
					display dialog "Missing"
				end if
			end if
			
		end repeat
	end tell
end tell

Found it.



set x to path to me
tell application "Finder"
	set destinationFolder to container of x as text
	set tFile to (file "template.indd" of folder destinationFolder) as text
end tell

tell application "Adobe InDesign CC 2015"
	open tFile
	
	tell document 1
		set linkList to every link
		repeat with aLink in linkList
			if status of aLink is link out of date then
				update aLink
			else
				if status of aLink is link missing then
					
					display dialog "Missing"
				end if
			end if
			
		end repeat
	end tell
	
	set _NoCrops to PDF export preset "[Press Quality]"
	set _Name to name of active document as string
	tell active document
		export format PDF type to (destinationFolder & _Name & " - No Crops X" & ".pdf") using _NoCrops without showing options
	end tell
	
	close active document saving yes
	
end tell


Thank you to all who have contributed in one way or another.