Home / Articles / Adobe Creative Suite / Learn How to Script Adobe Photoshop CS2

Learn How to Script Adobe Photoshop CS2

Chapter Description

This chapter demonstrates several techniques for creating scripts to use specifically with Adobe Photoshop CS2. More importantly, you'll learn how to use the Adobe Photoshop CS2 scripting references to find the objects, classes, properties, methods, and even some values (called constants or enumerations) you can use to create JavaScripts for Adobe Photoshop CS2.

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.

8. Working with the Adobe Photoshop CS2 Object Model | Next Section Previous Section