Adobe 65014293 Scripting Guide - Page 14

Path Item, Sub Path Item, and Path Point classes, Preferences class, Notifier class, Count Item class

Page 14 highlights

CHAPTER 2: Photoshop Scripting Basics Photoshop Object Model 14 Path Item, Sub Path Item, and Path Point classes The Path Item class represents information about a drawing object, such as the outline of a shape, or a curved line. The Sub Path Item class is contained in the Path Item class, and provides the actual geometry of the shape. The Path Point class contains information about each point in a sub path. See "Using the PathItem object" on page 49. Preferences class The Preferences class allows you to access and set the user preference settings. See "Working with document preferences" on page 61. Notifier class The Notifier object ties an event to a script. For example, if you would like Photoshop to automatically create a new document when you open the application, you could tie a script that creates a Document object to an Open Application event. For more information on notifiers, see "Using Notifier objects" on page 48. Count Item class The Count Item object provides scripting support for the Count Tool. Color Sampler class The Color Sampler object provides scripting support for the Color Sampler Tool. Measurement Scale class The Measurement Scale object provides scripting support for the new Measurement Scale feature that allows you to set a scale for your document. The containment hierarchy and the Photoshop user interface The following table provides describes how each object relates to the Photoshop user interface. Object name Description To create this object without using a script Application The Photoshop application. Start the Photoshop application. Document The working object, in which you create layers, channels, actions, and so on. In a script, you name, open, or save a document as you would a file in the application. In Photoshop, choose File > New or File > Open. Selection The selected area of a layer or document. Choose the marquee or lasso tools and drag your mouse.

  • 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
  • 86
  • 87

C
HAPTER
2: Photoshop Scripting Basics
Photoshop Object Model
14
Path Item, Sub Path Item, and Path Point classes
The
Path
Item
class represents information about a drawing object, such as the outline of a shape, or a
curved line. The
Sub
Path
Item
class is contained in the
Path
Item
class, and provides the actual geometry
of the shape. The
Path
Point
class contains information about each point in a sub path. See
“Using the
PathItem object” on page 49
.
Preferences class
The
Preferences
class allows you to access and set the user preference settings. See
“Working with
document preferences” on page 61
.
Notifier class
The
Notifier
object ties an event to a script. For example, if you would like Photoshop to automatically
create a new document when you open the application, you could tie a script that creates a
Document
object to an
Open
Application
event. For more information on notifiers, see
“Using Notifier objects” on
page 48
.
Count Item class
The
Count
Item
object provides scripting support for the Count Tool.
Color Sampler class
The
Color
Sampler
object provides scripting support for the Color Sampler Tool.
Measurement Scale class
The
Measurement
Scale
object provides scripting support for the new Measurement Scale feature that
allows you to set a scale for your document.
The containment hierarchy and the Photoshop user interface
The following table provides describes how each object relates to the Photoshop user interface.
Object name
Description
To create this object without using a
script
Application
The Photoshop application.
Start the Photoshop application.
Document
The working object, in which you create layers,
channels, actions, and so on. In a script, you
name, open, or save a document as you would
a file in the application.
In Photoshop, choose
File > New
or
File > Open
.
Selection
The selected area of a layer or document.
Choose the marquee or lasso tools and
drag your mouse.