Photoshop CS Scripting Guide
6
Introduction
Legacy COM scripting
1
1.8 Legacy COM scripting
Photoshop CS supports legacy COM scripting as long as you modify the way that you refer to
the Photoshop application object in your scripts. For example, instead of saying:
Set appRef = CreateObject("Photoshop.Application")
you must change the above code to read:
Set appRef = CreateObject("Photoshop.Application.8.1")
No other change is necessary for legacy COM scripts to run under Photoshop CS.
1.9 New Features
•
Layer Comps
New to Photoshop CS is the ability to group layers into a "layer comp" or layer
composition.
A layer comp is a snapshot of a state of the Layers palette. Layer comps record three types
of layer options: layer visibility (whether a layer in the Layers palette is showing or
hidden); layer position in the document; and layer appearance (whether a layer style is
applied to the layer).
Designers often create multiple compositions or "comps" of a page layout to show clients.
Using layer comps, you can create, manage and view multiple versions of a layout in a
single Photoshop or ImageReady file.
•
Web Photo Gallery
One of the most popular features of Photoshop is the ability to create a web photo gallery
out of a folder of files. You can now perform the same function through scripting.
•
JavaScripts get their own Scripts menu
JavaScripts now join AppleScript and Visual Basic scripts as first-class citizens. You can
add your own custom JavaScripts to the Photoshop menu system. The JavaScripts you
write are displayed in the “File->Scripts” menu item along with several pre-built
JavaScripts that ship with the product.
•
UI for JavaScript
New to Photoshop CS is the ability to create graphical interface objects, such as windows
and panels, employing the JavaScript programming language. UI for JavaScripts is covered
in the JavaScript Reference Guide.
•
Paths
Although Illustrator is the premier path (or
vector
) editing application, many users want to
modify their path items in Photoshop. This release of Photoshop allows you to manipulate
the path items and obtain path points in a Photoshop document. Functions include the
ability to create, modify, delete and copy paths using scripts.