Adobe PHOTOSHOP CS 2.0 - SCRIPTING GUIDE Manual page 77

Table of Contents

Advertisement

Adobe Photoshop CS2 Scripting Guide
Preference
units
dialog modes
Next, variables are declared that store document dimensions in inches and document resolution in pixels.
A display resolution is declared and the text "Hello, World!" is assigned to a string variable.
Finally, an
Document
AS
To work with document preferences:
1. Create and run the following script. See
details.
tell application "Adobe Photoshop CS2"
--make Photoshop CS2 the active (front-most) application
activate
--create variables for the default settings
set theStartRulerUnits to ruler units of settings
set theStartTypeUnits to type units of settings
set theStartDisplayDialogs to display dialogs
--change the settings
set ruler units of settings to inch units
set type units of settings to pixel units
set display dialogs to never
--create variables for default document settings
set theDocWidthInInches to 4
set theDocHeightInInches to 2
set theDocResolution to 72
set theDocString to "Hello, World!"
Set to
pixels
never
statement checks whether a
if
object if none exists.
Photoshop CS2
What it does (Continued)
Uses pixels as the unit of measurement for text (type)
Suppresses the use of dialogs so that your script executes without
the user being asked for input (such as clicking an OK button) at
various stages of the process.
Note:
dialog modes is not an option in the Photoshop CS2
application.
object has been created and then creates a new
Document
'Creating and Running an AppleScript' on page 22
Scripting Photoshop CS2
for
73

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop cs2

Table of Contents