Adobe 23102480 Scripting Guide - Page 31
Allowing or Preventing Dialogs, Working with the Photoshop CS3 Object Model
UPC - 883919080222
View all Adobe 23102480 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 31 highlights
Adobe Photoshop CS3 Scripting Guide Photoshop CS3 Scripting Photoshop CS3 31 preferences.typeUnits = TypeUnits.PIXELS In the Adobe Photoshop CS3 JavaScript Scripting Reference, or in the ExtendScript Object Model Viewer, look up the Preferences object to view all of the settings properties you can use. Additionally, look up the preferences property on the Application object. Allowing or Preventing Dialogs It is important to be able to control dialogs properly from a script. If a dialog appears, your script stops until a user dismisses the dialog. This is normally fine in an interactive script that expects a user to be sitting at the machine. But if you have a script that runs in an unsupervised (batch) mode, you do not want dialogs to be displayed and stop your script. You use the display dialogs (DisplayDialogs/displayDialogs) property of the Application object to control whether or not dialogs are displayed. Note: Using dialogs in your script is roughly equivalent to using stops in a Photoshop CS3 action. AS The following script prevents dialogs from being displayed: set display dialogs to never In the Adobe Photoshop CS3 AppleScript Scripting Reference or in the Photoshop CS3 AppleScript Dictionary, look up the Class application to find the values you can use for the display dialogs property. VBS To set dialog preferences, you use the DisplayDialogs property of the Application object. appRef.DisplayDialogs = 3 'for PsDialogModes --> 3 (psDisplayNoDialogs) Note that, because DisplayDialogs is a property of the Application object, you must reference the Application object in the script to get to the property. In the Adobe Photoshop CS3 Visual Basic Scripting Reference, or in the Visual Basic Object Browser, look up the Application object property DisplayDialogs. You'll see the value type for this property is the constant PsDialogModes. You can also look up the options for PsDialogModes. JS To set dialog preferences, you use the displayDialogs property of the Application object. displayDialogs = DialogModes.NO In the Adobe Photoshop CS3 JavaScript Scripting Reference, or in the ExtendScript Object Model Viewer, look up the Application object property displayDialogs, and then look up the constant DialogModes. Working with the Photoshop CS3 Object Model This section contains information about using the objects in the Photoshop CS3 Object Model. For information on object models, see Introduction to Scripting and 'Photoshop CS3 Object Model' on page 9. Using the Application Object This section describes how and when to use the Application object in a script. It also describes how to use some properties of the Application object.