- Viewing Photoshop CS2 objects, commands, and methods
- Creating new objects in a script
- Setting the active object
- Opening a document
- Saving a document
- Setting application preferences
- Suppressing dialog boxes
- Working with the Adobe Photoshop CS2 Object Model
- Working with color objects
- Working with filters
- Understanding clipboard interaction
- Working with units
- Advanced scripting
Suppressing dialog boxes
It is important to be able to control dialog boxes properly from a script. If a dialog appears while a script is executed, it stops until a user dismisses the dialog box. This is normally fine in an interactive script that expects a user to be sitting at the machine. But if a script runs in an unsupervised (batch) mode, you do not want dialogs to be displayed, stopping your script.
You use the displayDialogs property of the Application object to control whether or not dialog boxes are displayed.
To set dialog preferences, you use the displayDialogs property of the Application object.
displayDialogs = DialogModes.NO
In the scripting reference, Part 2 of this book, look up the Application object property displayDialogs, and then look up the constant DialogModes in the “Constants” chapter.