Photoshop CS2
Adobe Photoshop CS2 Scripting Guide
Scripting Photoshop CS2 47
Note:
Using dialogs in your script is roughly equivalent to using stops in a Photoshop CS2 action.
AS
The following script prevents dialogs from being displayed:
set display dialogs to never
In the
Adobe Photoshop CS2 AppleScript Scripting Reference
, 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 CS2 Visual Basic Scripting Reference
, look up the
Application
object property
DisplayDialogs
. You’ll see the value type for this property is the constant
psDialogModes
. In the
“Constants” chapter, 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 CS2 JavaScript Scripting Reference
, look up the
Application
object property
displayDialogs
, and then look up the constant
DialogModes
in the “Constants” chapter.
Working with the Photoshop CS2 Object Model
This section contains information about using the objects in the Photoshop CS2 Object Model. For
information on object models, see
‘Object Model Concepts’ on page 7
and
‘Photoshop CS2’s
Object Model’ on page 8
.
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.
You use the properties and commands/methods of the
Application
object to work with Photoshop CS2
functionality and objects such as the following:
●
Global Photoshop CS2 settings or preferences, such as unit values or color settings. See
‘Setting
Application Preferences’ on page 46
.
●
Documents—You can add or open documents and set the active document.
‘Opening a Document’
on page 42
and
‘Setting the Active Object’ on page 39
.
●
Actions—You can execute actions created either via scripting or using the Actions palette in the
Photoshop CS2 application.
You can use Application object properties to get information such as the following:
●
A list of fonts installed on the system.
●
AS:
Set theFonts to fonts
●
VBS:
Set fontsInstalled = AppRef.fonts
Содержание PHOTOSHOP CS 2.0 - SCRIPTING GUIDE
Страница 1: ...bbc Adobe Photoshop cs 2 Scripting Guide ...