Adobe 23102480 Scripting Guide - Page 29

Saving a Document, Save Classes

Page 29 highlights

Adobe Photoshop CS3 Scripting Guide Photoshop CS3 Scripting Photoshop CS3 29 Saving a Document Options for saving documents in Photoshop CS3 are illustrated below. To find out which properties you can specify for a specific file format save option, look up the object that begins with the file format name. For example, to find out about properties for saving an .eps file, do the following: ● In the Adobe Photoshop CS3 AppleScript Scripting Reference, look up the class EPS save options. ● In the Adobe Photoshop CS3 Visual Basic Scripting Reference or in the Adobe Photoshop CS3 JavaScript Scripting Reference look up EPSSaveOptions. Save Classes Save Options Photoshop BMP GIF EPS JPEG PDF Pict Pict File Resource Pixar PNG TIFF Raw DSC1 DSC2 SGI RGB Targa Note: It is important to note that the Open and Save formats are not identical. See 'Specifying File Formats to Open' on page 27 for comparison. Note: The following optional formats are available only when installed explicitly: ● Alias PIX ● Electric Image ● SGI RGB ● Wavefront RLA ● SoftImage The following scripts save a document as a .jpeg file. AS tell application "Adobe Photoshop CS3" make new document set myFile to "OS X 10.4.8 US:Users:psauto:Desktop:Rat.jpg" set myOptions to ¬ {class:JPEG save options, embed color profile:false, ¬ format options:standard, matte:background color matte} save current document in file myFile as JPEG with options ¬ myOptions appending no extension without copying end tell VBS Dim appRef,docRef Set appRef = CreateObject("Photoshop.Application")

  • 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
29
Saving a Document
Options for saving documents in Photoshop CS3 are illustrated below. To find out which properties you
can specify for a specific file format save option, look up the object that begins with the file format name.
For example, to find out about properties for saving an
.eps
file, do the following:
In the
Adobe Photoshop CS3 AppleScript Scripting Reference
, look up the class
EPS save options
.
In the
Adobe Photoshop CS3 Visual Basic Scripting Reference
or in the
Adobe Photoshop CS3 JavaScript
Scripting Reference
look up
EPSSaveOptions
.
Note:
It is important to note that the
Open
and
Save
formats are not identical. See
‘Specifying File Formats
to Open’ on page 27
for comparison.
Note:
The following optional formats are available only when installed explicitly:
Alias PIX
Electric Image
SGI RGB
Wavefront RLA
SoftImage
The following scripts save a document as a
.jpeg
file.
AS
tell application "Adobe Photoshop CS3"
make new document
set myFile to "OS X 10.4.8 US:Users:psauto:Desktop:Rat.jpg"
set myOptions to ¬
{class:JPEG save options, embed color profile:false, ¬
format options:standard, matte:background color matte}
save current document in file myFile as JPEG with options ¬
myOptions appending no extension without copying
end tell
VBS
Dim appRef,docRef
Set appRef = CreateObject("Photoshop.Application")
Save Classes
Save
Options
Photoshop
BMP
GIF
EPS
JPEG
PDF
Pict
File
Pict
Resource
Pixar
PNG
TIFF
Raw
DSC1
DSC2
SGI
RGB
Targa