Adobe 65009963 Scripting Guide - Page 5

The ExtendScript JSX format, Activating full scripting features

Page 5 highlights

Overview Activating full scripting features 5 The ExtendScript JSX format After Effects supports ExtendScript, Adobe's extended implementation of JavaScript. ExtendScript is used by all Adobe applications that provide a scripting interface. In addition to implementing the JavaScript language according to the ECMA 262 and E4X ECMA 357 specifications, ExtendScript provides certain additional features and utilities: ExtendScript Toolkit: For help in developing, debugging, and testing scripts, ExtendScript provides an interactive development and testing environment, the ExtendScript Toolkit. It also defines a global debugging object, the dollar ($) object, and a reporting utility for ExtendScript elements, the ExtendScript Reflection interface. File and Folder Objects: Because path name syntax is very different in different operating systems, Adobe ExtendScript defines File and Folder objects to provide platform-independent access to the underlying file system. ScriptUI User Interface Module: The ExtendScript ScriptUI module provides the ability to create and interact with user interface elements. ScriptUI provides an object model for windows and UI control elements that you can use to create a user interface for your scripts. Tools and Utilities: In addition, ExtendScript provides tools and features such as a localization utility for providing user-interface string values in different languages and global functions for displaying short messages in dialog boxes (alert, confirm, and prompt). Interapplication Communication: ExtendScript provides a common scripting environment for all Adobe applications, and allows interapplication communication through scripts. External Communication: ExtendScript provides a Socket object that allows you to communicate with remote systems from your After Effects scripts. These features and more are described in detail in the JavaScript Tools Guide, which is available with After Effects, and from partners.adobe.com. ExtendScript script files are distinguished by the .jsx file extension, a variation on the standard .js extension used with standard JavaScript files. After Effects scripts must include the .jsx file extension in order to be properly recognized by the application. Any UTF-8 encoded text file with the .jsx extension is recognized as an ExtendScript file. You can use the ExtendScript Toolkit to export a binary version of an ExtendScript file, which has the extension .jsxbin. Such a binary file may not be usable with all of the scripting integration features in After Effects. Activating full scripting features For security reasons, the scripting features that operate outside the After Effects application (such as adding and deleting files and folders on volumes, or accessing the network) are disabled by default. To enable these features, choose Preferences > General, and select "Allow Scripts To Write Files And Access Network." This allows you to: • Write to files • Create folders and set the current folder • Create a socket connection (for details of this JavaScript utility, see the JavaScript Tools Guide) 5

  • 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
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193

5
Overview
Activating full scripting features
5
The ExtendScript JSX format
After Effects supports ExtendScript, Adobe’s extended implementation of JavaScript. ExtendScript is used by
all Adobe applications that provide a scripting interface. In addition to implementing the JavaScript language
according to the ECMA 262 and E4X ECMA 357 specifications, ExtendScript provides certain additional
features and utilities:
ExtendScript Toolkit:
For help in developing, debugging, and testing scripts, ExtendScript provides an inter-
active development and testing environment, the ExtendScript Toolkit. It also defines a global debugging
object, the dollar ($) object, and a reporting utility for ExtendScript elements, the ExtendScript Reflection
interface.
File and Folder Objects:
Because path name syntax is very different in different operating systems, Adobe
ExtendScript defines
File
and
Folder
objects to provide platform-independent access to the underlying file
system.
ScriptUI User Interface Module:
The ExtendScript ScriptUI module provides the ability to create and interact
with user interface elements. ScriptUI provides an object model for windows and UI control elements that
you can use to create a user interface for your scripts.
Tools and Utilities:
In addition, ExtendScript provides tools and features such as a localization utility for
providing user-interface string values in different languages and global functions for displaying short
messages in dialog boxes (
alert
,
confirm
, and
prompt
).
Interapplication Communication:
ExtendScript provides a common scripting environment for all Adobe
applications, and allows interapplication communication through scripts.
External Communication:
ExtendScript provides a
Socket
object that allows you to communicate with remote
systems from your After Effects scripts.
These features and more are described in detail in the
JavaScript Tools Guide
, which is available with After
Effects, and from
partners.adobe.com
.
ExtendScript script files are distinguished by the
.jsx
file extension, a variation on the standard
.js
extension
used with standard JavaScript files. After Effects scripts must include the
.jsx
file extension in order to be
properly recognized by the application. Any UTF-8 encoded text file with the
.jsx
extension is recognized as
an ExtendScript file.
You can use the ExtendScript Toolkit to export a binary version of an ExtendScript file, which has the
extension
.jsxbin
. Such a binary file may not be usable with all of the scripting integration features in After
Effects.
Activating full scripting features
For security reasons, the scripting features that operate outside the After Effects application (such as adding
and deleting files and folders on volumes, or accessing the network) are disabled by default.
To enable these features, choose Preferences > General, and select “Allow Scripts To Write Files And Access
Network.” This allows you to:
Write to files
Create folders and set the current folder
Create a socket connection (for details of this JavaScript utility, see the
JavaScript Tools Guide
)