Adobe 23101764 - Photoshop CS - PC Manual page 54

Scripting guide
Hide thumbs Also See for 23101764 - Photoshop CS - PC:
Table of Contents

Advertisement

To finish up, set application preferences back to their original values.
This code snippet removes the "marching ants" and blurs the text on the right side of the
document.
3.4.3 Advanced AppleScript
The following AppleScript code sample is broken down into four sections, the first of which
deals with configuring document preferences.
Document Preferences
In this code segment, a Photoshop Application object is activated. Default configuration
settings for the application are saved into variables so that they can be restored later when the
script completes. These are the default configurations you most probably set up using the
File/Edit/Preferences dialog when you initially installed and configured Photoshop.
The script goes on to define new preferences for rulers and units and sets these to inches and
pixels, respectively.
Dialog modes is set to "never" so that the script runs without user intervention. Users will not,
in other words, be required to press "OK" each time the script generates a new dialog for
display.
Photoshop CS Scripting Guide
docRef.Selection.Select Array(Array(docWidthInPixels / 2, 0), _
Array(docWidthInPixels, 0), _
Array(docWidthInPixels, docHeightInPixels), _
Array(docWidthInPixels / 2, docHeightInPixels), _
Array(docWidthInPixels / 2, 0))
newTextLayer.ApplyMotionBlur 45, 5
docRef.Selection.Deselect
app.Preferences.RulerUnits = startRulerUnits
app.Preferences.TypeUnits = startTypeUnits
app.DisplayDialogs = startDisplayDialogs
Scripting Photoshop
Advanced Scripting
3
50

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop cs

Table of Contents