beautypg.com

Run a javascript, Set scripts and actions to run automatically, Creating data-driven graphics – Adobe Photoshop CS3 User Manual

Page 630: About data-driven graphics

background image

PHOTOSHOP CS3

User Guide

623

Note: Refer to the scripting documentation included with your Photoshop application installation: Photoshop Apple-
Script Reference Guide.pdf, Photoshop JavaScript Reference Guide.pdf, Photoshop Scripting Guide.pdf, and Photoshop
VBScript Reference Guide.pdf. These guides can be found in Photoshop CS3/Scripting Guide.

Run a JavaScript

Choose File > Scripts and then select the script from the list. The scripts list includes all the script files saved with

a .js or .jsx extension and saved in the Photoshop CS3/Presets/Scripts folder. To run a script saved in another
location, choose File > Scripts > Browse and navigate to the script.

Set scripts and actions to run automatically

You can have an event, such as opening, saving, or exporting a file in Photoshop, trigger a JavaScript or a Photoshop
action. Photoshop provides several default events, or you can have any scriptable Photoshop event trigger the script
or action. See the Photoshop Scripting Guide for more information on scriptable events.

1

Choose File > Scripts > Script Events Manager.

2

Select Enable Events To Run Scripts/Actions.

3

From the Photoshop Event menu, choose the event that will trigger the script or action.

4

Select either Script or Action, and then choose the script or action to run when the event occurs.

Photoshop has several sample scripts you can choose. To run a different script, choose Browse and then navigate to
the script. For actions, choose the action set from the first pop-up menu and an action from that set in the second
menu. The action must be loaded in the Actions palette to appear in these menus.

5

Click Add. The event and its associated script or action are listed in the dialog box.

6

To disable and remove individual events, select the event in the list and click Remove. To disable all events, but

keep them in the list, deselect Enable Events To Run Scripts/Actions.

Creating data-driven graphics

About data-driven graphics

Data-driven graphics make it possible to produce multiple versions of an image quickly and accurately for print or
web projects. For example, you can produce 100 versions of a web banner with different text and images, all based
on a template design.

You generate the graphics by exporting them from Photoshop, or you can create templates for use in other programs
such as Adobe® GoLive® or Adobe® Graphics Server (see “Saving templates for use with other Adobe products” on
page 628).

Follow these general steps to create graphics from templates and data sets:

1. Create the base graphic to use as the template.

Use layers to separate the elements that you want to change in the graphic.

2. Define variables in the graphic.

Variables specify the parts of the image that change. (See “Define variables” on page 624.)