Adobe 23101764 Scripting Guide - Page 10

Legacy COM scripting, 9 New Features

Page 10 highlights

Introduction 1 Legacy COM scripting 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. Photoshop CS Scripting Guide 6

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105

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
le.
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
les. You can now perform the same function through scripting.
JavaScripts get their own Scripts menu
JavaScripts now join AppleScript and Visual Basic scripts as
rst-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.