InDesign CS4 Dialogs

Have an odd one here. If I add this line to the script, “close every document saving no”, it nullifies the command, “set dialogs to never interact”. I’ve tried placing it in a different spot in the script, but to no avail. I really need both of these lines to function properly, any ideas?

set fileList to (choose file) as string

set filePath to fileList as string

tell application "Adobe InDesign CS4"
	activate
	if (count of documents) is greater than 0 then close every document saving no
end tell
delay 1
tell application "Adobe InDesign CS4"
	set dialogs to never interact
	with timeout of 10000 seconds
		set printDoc to open alias filePath without showing window
	end timeout
end tell

Model: MacBook Pro 2.66GHz Intel Core 2 Duo
AppleScript: 2.1.2
Browser: Safari 533.17.8
Operating System: Mac OS X (10.6)

The statement “set dialogs to never interact” is not InDesign code – it has no dialogs property. What you need is:

 set user interaction level of script preferences to never interact

And make sure you switch it back before you quit:

 set user interaction level of script preferences to interact with all

otherwise you could stop dialogs appearing in subsequent scripts.

Thanks, that did the trick!