Adobe 23101764 Scripting Guide - Page 89
Dim originalRulerUnits As Photoshop.PsUnits
UPC - 718659340025
View all Adobe 23101764 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 89 highlights
Scripting Photoshop 3 Selections AS: expand selection of current document by pixels 5 contract selection of current document by pixels 5 feather selection of current document by pixels 5 VB: Dim appRef As Photoshop.Application Set appRef = CreateObject("Photoshop.Application") 'remember unit settings; and set to pixels Dim originalRulerUnits As Photoshop.PsUnits originalRulerUnits = appRef.Preferences.RulerUnits appRef.Preferences.RulerUnits = psPixels Dim selRef As Photoshop.Selection Set selRef = appRef.ActiveDocument.Selection selRef.Expand 5 selRef.Contract 5 selRef.Feather 5 'Rem restore unit setting appRef.Preferences.RulerUnits = originalRulerUnits JS: // remember unit settings; and set to pixels var originalRulerUnits = app.preferences.rulerUnits; app.preferences.rulerUnits = Units.PIXELS; var selRef = app.activeDocument.selection selRef.expand( 5 ); selRef.contract( 5 ); selRef.feather( 5 ); // restore unit setting app.preferences.rulerUnits = originalRulerUnits; Photoshop CS Scripting Guide 85