Adobe 23102480 Scripting Guide - Page 46

Using the Document Info Object, Using History State Objects, File > File Info, Window > History

Page 46 highlights

Adobe Photoshop CS3 Scripting Guide Photoshop CS3 Scripting Photoshop CS3 46 AS set kind of myChannel to selected area channel VBS channelRef.ind = 3 'for psSelectedAreaAlphaChannel 'from the constant value PsChannelType JS channelRef.kind = ChannelType.SELECTEDAREA Using the Document Info Object In Photoshop CS3, you can associate information with a document by choosing File > File Info. To accomplish this task in a script, you use the info-object (DocumentInfo/DocumentInfo) object, which is stored in the info (Info/info) property of the Document object. The following examples demonstrate how to use the DocumentInfo object to set the copyrighted status and owner URL of a document. AS set docInfoRef to info of current document get EXIF of docInfoRef set copyrighted of docInfoRef to copyrighted work set owner url of docInfoRef to "http://www.adobe.com" get EXIF of docInfoRef VBS Set docInfoRef = docRef.Info docInfoRef.Copyrighted = 1 'for psCopyrightedWork docInfoRef.OwnerUrl = "http://www.adobe.com" JS docInfoRef = docRef.info docInfoRef.copyrighted = CopyrightedType.COPYRIGHTEDWORK docInfoRef.ownerUrl = "http://www.adobe.com" For information about other types of information (properties) you can associate with a document, look up the following: ● In the Adobe Photoshop CS3 AppleScript Scripting Reference or in the Photoshop CS3 AppleScript Dictionary, look up the properties for the class info-object. ● In the Adobe Photoshop CS3 Visual Basic Scripting Reference, the Adobe Photoshop CS3 JavaScript Scripting Reference, the Visual Basic Object Browser or the ExtendScript Object Model Viewer, look up the properties for the DocumentInfo object. Using History State Objects Photoshop CS3 keeps a history of the actions that affect documents. Each time you apply a change to an image in the Photoshop CS3 application, you create a history state; you can access a document's history states from the History palette by selecting Window > History. See Photoshop CS3 Help for additional information about History State.

  • 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
Scripting Photoshop CS3
46
AS
set kind of myChannel to selected area channel
VBS
channelRef.ind = 3 'for psSelectedAreaAlphaChannel
'from the constant value PsChannelType
JS
channelRef.kind = ChannelType.SELECTEDAREA
Using the Document Info Object
In Photoshop CS3, you can associate information with a document by choosing
File > File Info
.
To accomplish this task in a script, you use the
info-object
(
DocumentInfo/DocumentInfo)
object,
which is stored in the
info
(
Info
/
info
) property of the
Document
object. The following examples
demonstrate how to use the
DocumentInfo
object to set the copyrighted status and owner URL of a
document.
AS
set docInfoRef to info of current document
get EXIF of docInfoRef
set copyrighted of docInfoRef to copyrighted work
set owner url of docInfoRef to "http://www.adobe.com"
get EXIF of docInfoRef
VBS
Set docInfoRef = docRef.Info
docInfoRef.Copyrighted = 1 'for psCopyrightedWork
docInfoRef.OwnerUrl = "http://www.adobe.com"
JS
docInfoRef = docRef.info
docInfoRef.copyrighted = CopyrightedType.COPYRIGHTEDWORK
docInfoRef.ownerUrl = "http://www.adobe.com"
For information about other types of information (properties) you can associate with a document, look up
the following:
In the
Adobe Photoshop CS3 AppleScript Scripting Reference
or in the Photoshop CS3 AppleScript
Dictionary, look up the properties for the class
info-object
.
In the
Adobe Photoshop CS3 Visual Basic Scripting Reference
, the
Adobe Photoshop CS3 JavaScript
Scripting Reference
, the Visual Basic Object Browser or the ExtendScript Object Model Viewer, look up
the properties for the
DocumentInfo
object.
Using History State Objects
Photoshop CS3 keeps a history of the actions that affect documents. Each time you apply a change to an
image in the Photoshop CS3 application, you create a
history state
; you can access a document’s history
states from the History palette by selecting
Window > History
. See Photoshop CS3 Help for additional
information about History State.