Adobe 23101764 Scripting Guide - Page 7

Why use scripting?, 4 What about actions?

Page 7 highlights

Introduction 1 Why use scripting? 1.3 Why use scripting? Graphic design is a field characterized by creativity, but aspects of the actual work of illustration and image manipulation are anything but creative. Scripting provides a tool to help save time spent on repetitive production tasks such as resizing or reformatting documents. Start with short, simple scripts such as those described in this manual and move on to more involved scripts as you become more proficient. Any repetitive task is a good candidate for a script. Once you can identify the steps and conditions involved in performing the task, you're ready to write a script to take care of it. 1.4 What about actions? Photoshop actions are different from scripts. A Photoshop action is a series of tasks you have recorded while using the application-menu choices, tool choices, selection, and other commands. When you "play" an action, Photoshop performs all of the recorded commands. Actions and scripts are two ways of automating repetitive tasks, but they work very differently. • You cannot add conditional logic to an action. Unlike a script, actions cannot make decisions based on the current situation. • A single script can target multiple hosts. Actions can't. For example, you could target both Photoshop and Illustrator in the same script. The Actions palette, invoked under the Window menu, supports actions with a great deal of sophistication (including the ability to display dialogs) and allows users to work with selected objects, as illustrated below. Photoshop CS Scripting Guide 3

  • 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
3
Introduction
Why use scripting?
1
1.3 Why use scripting?
Graphic design is a
eld characterized by creativity, but aspects of the actual work of
illustration and image manipulation are anything but creative. Scripting provides a tool to help
save time spent on repetitive production tasks such as resizing or reformatting documents.
Start with short, simple scripts such as those described in this manual and move on to more
involved scripts as you become more pro
cient. Any repetitive task is a good candidate for a
script. Once you can identify the steps and conditions involved in performing the task, you’re
ready to write a script to take care of it.
1.4 What about actions?
Photoshop actions are different from scripts. A Photoshop action is a series of tasks you have
recorded while using the application—menu choices, tool choices, selection, and other
commands. When you “play” an action, Photoshop performs all of the recorded commands.
Actions and scripts are two ways of automating repetitive tasks, but they work very differently.
You cannot add conditional logic to an action. Unlike a script, actions cannot make
decisions based on the current situation.
A single script can target multiple hosts. Actions can’t. For example, you could target both
Photoshop and Illustrator in the same script.
The Actions palette, invoked under the Window menu, supports actions with a great deal of
sophistication (including the ability to display dialogs) and allows users to work with selected
objects, as illustrated below.