Adobe 23102480 Scripting Guide - Page 72

Action Manager, The ScriptListener Plug-In, Installing ScriptListener

Page 72 highlights

4 Action Manager Photoshop CS3 actions allow you to save time by automating repetitive tasks. You create and run actions in the application interface using the Actions palette. You can also manage actions in scripts using a utility called the Action Manager. The Action Manager allows you to write scripts that target Photoshop CS3 functionality that is not otherwise accessible in the scripting interface, such as third party plug-ins and filters. The only requirement for using the Action Manager is that the task that you want to access from the Action Manager is recordable. This chapter describes how to use the Action Manager and the scripting interface objects it includes. The ScriptListener Plug-In Before you use the Action Manager, you must install the ScriptListener plug-in. ScriptListener records a file with scripting code corresponding to the actions you perform in the UI. Tip: Because ScriptListener records most of your actions, install ScriptListener only when you are creating Action Manager scripts. Leaving ScriptListener installed continuously will not only create large files that occupy memory on your hard drive, it can slow Photoshop CS3 performance. When you perform a task or series of tasks in Photoshop CS3, ScriptListener creates several files, which contain code that represents the actions taken in Photoshop: ● ScriptingListenerJS.log, containing JavaScript code, ● ScriptingListenerVB.log, containing VBScript code (Windows only). ScriptListener creates these files on the desktop. Note: There is no AppleScript interface to the Action Manager. However, you can access the Action Manager from an AppleScript by executing a JavaScript from AppleScript. See 'Running JavaScript-based Action Manager code from AppleScript' on page 78. Installing ScriptListener The ScriptListener plug-in is located in the ..\Adobe Photoshop CS3\Scripting Guide\Utilities folder. ➤ To install the ScriptListener: 1. Select the file ScriptListener.8li and then choose Edit > Copy. 2. Paste the file copy to the following location: ..\Adobe Photoshop CS3\Plug-Ins\Automate 3. Open Photoshop CS3. Note: If Photoshop CS3 is already open, close it and then start it again. This will allow Photoshop to load the plug-in. 72

  • 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

72
4
Action Manager
Photoshop CS3 actions allow you to save time by automating repetitive tasks. You create and run actions
in the application interface using the Actions palette.
You can also manage actions in scripts using a utility called the
Action Manager
. The Action Manager allows
you to write scripts that target Photoshop CS3 functionality that is not otherwise accessible in the
scripting interface, such as third party plug-ins and filters. The only requirement for using the Action
Manager is that the task that you want to access from the Action Manager is recordable.
This chapter describes how to use the Action Manager and the scripting interface objects it includes.
The ScriptListener Plug-In
Before you use the Action Manager, you must install the ScriptListener plug-in. ScriptListener records a file
with scripting code corresponding to the actions you perform in the UI.
Tip:
Because ScriptListener records most of your actions, install ScriptListener only when you are creating
Action Manager scripts. Leaving ScriptListener installed continuously will not only create large files
that occupy memory on your hard drive, it can slow Photoshop CS3 performance.
When you perform a task or series of tasks in Photoshop CS3, ScriptListener creates several files, which
contain code that represents the actions taken in Photoshop:
ScriptingListenerJS.log
, containing JavaScript code,
ScriptingListenerVB.log
, containing VBScript code (Windows only).
ScriptListener creates these files on the desktop.
Note:
There is no AppleScript interface to the Action Manager. However, you can access the Action
Manager from an AppleScript by executing a JavaScript from AppleScript. See
‘Running
JavaScript-based Action Manager code from AppleScript’ on page 78
.
Installing ScriptListener
The ScriptListener plug-in is located in the
..\Adobe Photoshop CS3\Scripting Guide\Utilities
folder.
To install the ScriptListener:
1.
Select the file
ScriptListener.8li
and then choose
Edit
>
Copy
.
2.
Paste the file copy to the following location:
..\Adobe Photoshop CS3\Plug-Ins\Automate
3.
Open Photoshop CS3.
Note:
If Photoshop CS3 is already open, close it and then start it again. This will allow Photoshop to
load the plug-in.