Adobe 23102480 Scripting Guide - Page 30
Setting Application Preferences, Photoshop > Preferences, Edit > Preferences
UPC - 883919080222
View all Adobe 23102480 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 30 highlights
Adobe Photoshop CS3 Scripting Guide Photoshop CS3 Scripting Photoshop CS3 30 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, True, 2 'for psLowercase 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. Note: The properties in the settings class/Preferences object correlate to the Photoshop CS3 Preferences dialog options, which you display by choosing Photoshop > Preferences on Mac OS or Edit > Preferences in Windows versions of Photoshop CS3. For explanations of individual preferences, please refer to Photoshop CS3 Help. AS You use properties of the settings class to set application preferences in AppleScript. The following 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 CS3 AppleScript Scripting Reference, or in the Photoshop CS3 AppleScript Dictionary, look up class settings-object to view all of the settings properties you can use. VBS The Preferences object is a property of the Application object. When you use the Preferences object in a VBScript script, you must indicate its containment in the Application object. appRef.Preferences.RulerUnits = 2 'for PsUnits --> 2 (psInches) appRef.Preferences.TypeUnits = 1 'for PsTypeUnits --> 1 (psPixels) In the Adobe Photoshop CS3 Visual Basic Scripting Reference, or in the Visual Basic Object Browser, look up the Preferences object to view all of the settings properties you can use. Additionally, look up the Preferences property on the Application object. JS The Preferences object is a property of the Application object. preferences.rulerUnits = Units.INCHES