Adobe 65048599 Scripting Guide - Page 73

Action Manager, The ScriptListener Plug-In, Installing ScriptListener

Page 73 highlights

4 Action Manager Photoshop 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 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 performance. When you perform a task or series of tasks in Photoshop, 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 80. Installing ScriptListener The ScriptListener plug-in is located in the ..\Adobe Photoshop CS5\Scripting\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 CS5\Plug-Ins\Automate 3. Open Photoshop. NOTE: If Photoshop is already open, close it and then start it again. This will allow Photoshop to load the plug-in. 73

  • 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

73
4
Action Manager
Photoshop 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 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.
T
IP
:
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 performance.
When you perform a task or series of tasks in Photoshop, 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.
N
OTE
:
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 80
.
Installing ScriptListener
The ScriptListener plug-in is located in the
..\Adobe
Photoshop
CS5\Scripting\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
CS5\Plug-Ins\Automate
3.
Open Photoshop.
N
OTE
:
If Photoshop is already open, close it and then start it again. This will allow Photoshop to load
the plug-in.