InDesign -- Modal alerts / Dialogs

Does anyone know how to disable a modal alert or automate a modal alert to make it go away? Here is my scenario:

My script opens an InDesign document. After document is open, application throws a modal alert telling user that "there is/are missing fonts and other fonts will be substituted for the time being.

Here’s an image of the alert:

http://members.cox.net/razor7132/Snapshot2005_12_30_16_57_31.jpg

I would like to disable the alert all together or by-pass it by automating the clicking of the “OK” button.

Thanks in advance.

Ramon

Model: iMac G5
AppleScript: 1.10
Browser: Firefox 1.0.7
Operating System: Mac OS X (10.4)

Assuming that the name of the dialog is “dialog1” and that “Enter” will dismiss it try this:

if (name of window 1 is "dialog1") then tell application "System Events" to key code 76

If that doesn’t work, then you’ll have to find out what the modal dialog window is called.

another way to do this is to completely disable all the dialogs indesign might throw at the start of the script ie:

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

Setting user interaction to none works for me, too – but at the end of your script, you might consider setting the interaction level back to all, because you probably don’t want to disable modals past the run of your script …

Ted

thank you all very much. I appreciate it!

Ramon

Hello, I am new to this forum and was searching for a way round this very problem. However, I get a dialog telling me that “Adobe CS2 got an error: Can’t set user interaction level to never interact.” I have tried this as a part of my script and also as a little standalone, with no success.

Both this forum and Adobe mention it, not to mention the fact that it appears as a preference in the script library. Grrr.

Funny that. I am getting the same problem!

The user interaction command was moved for InDesign CS2. It used to be a property of the application itself, now it’s a property of the Script Preference class:


tell application "Adobe InDesign CS2"
	set user interaction level of script preferences to never interact
		--do stuff here...
	set user interaction level of script preferences to interact with all
end tell

Mark