Adobe 23102480 Scripting Guide - Page 12

History State Class, Document Info Class, Path Item, Sub Path Item, and Path Point Classes

Page 12 highlights

Adobe Photoshop CS3 Scripting Guide Photoshop CS3 Photoshop CS3 Scripting Basics 12 History State Class The History State class is a palette object that keeps track of changes made to a document. Each time you apply a change to an image, the new state of that image is added to the palette. These states are accessible from document object and can be used to reset the document to a previous state. A history state can also be used to fill a selection. For more information on history objects, see 'Using History State Objects' on page 46. Note: In AppleScript, if you create a document and then immediately try to get history state, Photoshop returns an error. You must first activate Photoshop-make it the front-most application-before you can access history states. Document Info Class The Document Info class stores metadata about a document. Metadata is any data that helps to describe the content or characteristics of a file. For more information on document info, see 'Using the Document Info Object' on page 46. 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 48. Preferences Class The Preferences class allows you to access and set the user preference settings. See 'Working with Document Preferences' on page 60. Notifier Class The Notifier object ties an event to a script. For example, if you would like Photoshop CS3 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 47. 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 CS3 User Interface The following table provides describes how each object relates to the Photoshop CS3 user interface.

  • 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

Photoshop CS3
Adobe Photoshop CS3
Scripting Guide
Photoshop CS3 Scripting Basics
12
History State Class
The
History State
class is a palette object that keeps track of changes made to a document. Each time
you apply a change to an image, the new state of that image is added to the palette. These states are
accessible from document object and can be used to reset the document to a previous state. A history
state can also be used to fill a selection. For more information on history objects, see
‘Using History State
Objects’ on page 46
.
Note:
In AppleScript, if you create a document and then immediately try to get history state, Photoshop
returns an error. You must first activate Photoshop—make it the front-most application—before
you can access history states.
Document Info Class
The
Document Info
class stores metadata about a document. Metadata is any data that helps to describe
the content or characteristics of a file. For more information on document info, see
‘Using the Document
Info Object’ on page 46
.
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 48
.
Preferences Class
The
Preferences
class allows you to access and set the user preference settings. See
‘Working with
Document Preferences’ on page 60
.
Notifier Class
The
Notifier
object ties an event to a script. For example, if you would like Photoshop CS3 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 47
.
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 CS3 User Interface
The following table provides describes how each object relates to the Photoshop CS3 user interface.