Adobe Smoke Alarm CS3 ユーザーズマニュアル

ページ / 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.