Setting Application Preferences - Adobe 65014912 Manual

Photoshop cs4 extended
Table of Contents

Advertisement

C
3: Scripting Photoshop
HAPTER
VBS
Dim appRef,docRef
Set appRef = CreateObject("Photoshop.Application")
Set docRef = appRef.Documents.Add()
Set jpgSaveOptions = CreateObject("Photoshop.JPEGSaveOptions")
jpgSaveOptions.EmbedColorProfile = True
jpgSaveOptions.FormatOptions = 1 'for psStandardBaseline
jpgSaveOptions.Matte = 1 'for psNoMatte
jpgSaveOptions.Quality = 1
appRef.ActiveDocument.SaveAs "c:\temp\myFile2", _
jpgSaveOptions,
JS
app.documents.add( 4, 4 )
jpgFile = new File( "/Temp001.jpeg" )
jpgSaveOptions = new JPEGSaveOptions()
jpgSaveOptions.embedColorProfile = true
jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE
jpgSaveOptions.matte = MatteType.NONE
jpgSaveOptions.quality = 1
app.activeDocument.saveAs(jpgFile, jpgSaveOptions, true,
Extension.LOWERCASE)

Setting Application Preferences

Your script can set application preferences such as color picker, file saving options, guide-grid-slice
settings, and so on.
N
: The properties in the
OTE
Preferences dialog options, which you display by choosing Photoshop > Preferences on Mac OS or
Edit > Preferences in Windows versions of Photoshop. For explanations of individual preferences, please
refer to Photoshop Help.
AS
You use properties of the
script sets ruler and type unit settings:
set ruler units of settings to inch units
set type units of settings to pixel units
In the Adobe Photoshop CS4 AppleScript Scripting Reference, or in the Photoshop AppleScript Dictionary,
look up class
VBS
The
Preferences
in a VBScript script, you must indicate its containment in the
appRef.Preferences.RulerUnits = 2 'for PsUnits --> 2 (psInches)
appRef.Preferences.TypeUnits = 1 'for PsTypeUnits --> 1 (psPixels)
In the Adobe Photoshop CS4 Visual Basic Scripting Reference, or in the Visual Basic Object Browser, look up
the
Preferences
Preferences
True, 2 'for psLowercase
settings
settings
to view all of the settings properties you can use.
settings-object
object is a property of the
object to view all of the settings properties you can use. Additionally, look up the
property on the
Application
class/
object correlate to the Photoshop CS4
Preferences
class to set application preferences in AppleScript. The following
Application
object.
Setting Application Preferences 32
object. When you use the
object.
Application
object
Preferences

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents