Adobe 23102480 Scripting Guide - Page 19

Scripting Photoshop CS3, Viewing Photoshop CS3 Objects, Commands, and Methods

Page 19 highlights

3 Scripting Photoshop CS3 This chapter demonstrates several techniques for using the Photoshop Document Object Model (DOM) to create scripts to use specifically with Photoshop CS3. You will also learn how to use the reference manuals and object model browsers to find information about the objects, classes, properties, commands, and even some values (called constants or enumerations) you can use to create AppleScripts, VBScript scripts, and JavaScripts for Photoshop CS3. Tip: Throughout this chapter, the explanation of how to create a script is followed by instructions for locating information about the specific elements used in the script. Using these instructions will help you quickly understand how to script Photoshop CS3. Viewing Photoshop CS3 Objects, Commands, and Methods The Photoshop CS3 reference material for each of the three scripting languages is found in the reference manuals provided in this installation: ● Adobe Photoshop CS3 AppleScript Scripting Reference ● Adobe Photoshop CS3 Visual Basic Scripting Reference ● Adobe Photoshop CS3 JavaScript Scripting Reference In addition, you can also access reference material by using the associated object model browser for each language: ● For AppleScript, use the AppleScript Script Editor to view the Photoshop CS3 AppleScript Dictionary. ● For VBScript, use the VBA editor in Microsoft Word, or the Visual Basic Object Browser in Visual Basic, or Visual Studio. ● For JavaScript, use the ExtendScript Object Model Viewer. See the JavaScript Tools Guide for more information. Viewing Photoshop CS3's AppleScript Dictionary You use Apple's Script Editor application to view the dictionary. Note: The default location for the Script Editor is Applications > AppleScript > Script Editor. ➤ To view the AppleScript dictionary: 1. In Script Editor, choose File > Open Dictionary. Script Editor displays an Open Dictionary dialog. 2. Choose AdobePhotoshop CS3, and then click Open. Script Editor opens Photoshop CS3 and then displays the Photoshop CS3 dictionary, which lists objects as well as the commands, properties and elements associated with each object. The dictionary also lists the parameters for each command. Note: The Photoshop CS3 AppleScript Dictionary does not display the complete list of open and save formats. 19

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85

19
3
Scripting Photoshop CS3
This chapter demonstrates several techniques for using the Photoshop Document Object Model (DOM) to
create scripts to use specifically with Photoshop CS3.
You will also learn how to use the reference manuals and object model browsers to find information about
the objects, classes, properties, commands, and even some values (called
constants
or
enumerations
) you
can use to create AppleScripts, VBScript scripts, and JavaScripts for Photoshop CS3.
Tip:
Throughout this chapter, the explanation of how to create a script is followed by instructions for
locating information about the specific elements used in the script. Using these instructions will help
you quickly understand how to script Photoshop CS3.
Viewing Photoshop CS3 Objects, Commands, and Methods
The Photoshop CS3 reference material for each of the three scripting languages is found in the reference
manuals provided in this installation:
Adobe Photoshop CS3 AppleScript Scripting Reference
Adobe Photoshop CS3 Visual Basic Scripting Reference
Adobe Photoshop CS3 JavaScript Scripting Reference
In addition, you can also access reference material by using the associated object model browser for each
language:
For AppleScript, use the AppleScript Script Editor to view the Photoshop CS3 AppleScript Dictionary.
For VBScript, use the VBA editor in Microsoft Word, or the Visual Basic Object Browser in Visual Basic, or
Visual Studio.
For JavaScript, use the ExtendScript Object Model Viewer. See the
JavaScript Tools Guide
for more
information.
Viewing Photoshop CS3’s AppleScript Dictionary
You use Apple’s Script Editor application to view the dictionary.
Note:
The default location for the Script Editor is
Applications > AppleScript > Script Editor
.
To view the AppleScript dictionary:
1.
In Script Editor, choose
File > Open Dictionary
.
Script Editor displays an Open Dictionary dialog.
2.
Choose AdobePhotoshop CS3, and then click
Open
.
Script Editor opens Photoshop CS3 and then displays the Photoshop CS3 dictionary, which lists objects
as well as the commands, properties and elements associated with each object. The dictionary also lists
the parameters for each command.
Note:
The Photoshop CS3 AppleScript Dictionary does not display the complete list of open and save
formats.