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?
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!