Open Indesign file suppressing error message

Hi,

I’ve got a script that opens an InDesign file and processes it. The script works fine. But sometimes an InDesign file can’t find some fonts and the application shows an error message displaying which fonts are missing with the option to replace them.

Because of this message the script stalls. The error message is unimportant for what needs to be done to the file and can safely be ignored. But I can’t get InDesign to ignore it. There is something called:

open sourceFile without dialog

which looks like it should do the trick, but no joy.

Anyone got any idea on how to suppress this dialog? Is there a direct way (open command with some parameter like “without dialog”) or should I look for a way to check for the occurence of an error dialog and act upon that?

Thanks in advance for any input.

Ton

see topic: InDesign – Modal alerts / Dialogs

InDesign CS1:

tell application "Adobe InDesign CS"
	set user interaction level to never interact
end tell

InDesign CS2:

tell application "Adobe InDesign CS2"
	set user interaction level of script preferences to never interact
end tell

Greets from
TMA

Hi Mart

For whatever reason setting the user interaction level for me just didn’t work not when its prompting for fonts.
the only other solution i can think of to remedy your problem would be something like this:

on open s
	tell application "Adobe InDesign CS2"
		repeat with i in s
			open i
			tell application "System Events"
				repeat 2 times
					keystroke return
				end repeat
			end tell
			delay 2
			close document 1 saving no
		end repeat
	end tell
end open

using GUI is never the route anyone wants to take however it works. (or it did for me!)
Good Luck!

I had the same issue with a “convert to IDML” script. I solved it by using the timeout command. e.g.

with timeout of 300 seconds
tell application “Adobe InDesign CC”
open work_file
–enter instructions here
end tell
end timeout

With the timeout command, the script waits for you to dismiss all warnings and then carries on regardless.