Creating A Sample Hello World Script; Creating And Running An Applescript - Adobe 23102480 - Photoshop CS3 - PC Programming Manual

Scripting guide
Table of Contents

Advertisement

Adobe Photoshop CS3 Scripting Guide

Creating a Sample Hello World Script

This section demonstrates a very simple script in each of the three scripting languages for Photoshop CS3.
Traditionally, the first thing to accomplish in any programming environment is the display of a "Hello
World" message.
Our Hello World scripts will do the following:
1. Open the Photoshop CS3 application.
2. Create a new
When we create the document, we will also create a variable named
reference to the document as the value of
high.
3. Create an
In our script, we will create a variable named
Layer
4. Define
5. Set the contents of the text item to "Hello World".
Note:
We will also include comments throughout the scripts. In fact, because this is our first script, we will
use comments to excess.
These steps mirror a specific path in the containment hierarchy, as illustrated below.

Creating and Running an AppleScript

You must open Apple's Script Editor application in order to complete this procedure.
Note:
The default location for the Script Editor is Applications > AppleScript > Script Editor.
To create and run your first Photoshop CS3 AppleScript:
1. Enter the following script in the Script Editor:
object.
Document
object.
Art Layer
object as the value of
artLayerRef
as a text item.
artLayerRef
Photoshop CS3
. The document will be 4 inches wide and 2 inches
docRef
and then assign a reference to the
artLayerRef
.
Application
Document
Art Layer
Text Item
Photoshop CS3 Scripting Basics
and then assign a
docRef
15
Art

Advertisement

Table of Contents
loading

This manual is also suitable for:

13102498 - photoshop cs3 - macPhotoshop cs3

Table of Contents