Adobe 27510753 Scripting Guide - Page 64

Dollar ($) object functions, objects, screens, strict, version, about, clearbp, getenv, setbp

Page 64 highlights

56 Using ExtendScript Tools and Features Adobe InDesign CS2 Scripting Guide objects os screens strict version Number The total count of all JavaScript objects defined so far. Read only. String The current operating system version. Read only. Array Boolean An array of objects containing information about the display screens attached to your computer. Each object has the properties left, top, right, and bottom, which contain the four corners of each screen in global coordinates. A property primary is true if that object describes the primary display. When true, any attempt to write to a read-only property causes a runtime error. Some objects do not permit the creation of new properties when true. String The version number of the ExtendScript engine as a three-part number and description; for example: "3.6.5 (debug)" Read only. Dollar ($) object functions about $.about () Displays the About box for the ExtendScript component, and returns the text of the About box as a string. bp $.bp ([condition]) Executes a breakpoint at the current position. Returns undefined. If no condition is needed, it is recommended that you use the JavaScript debugger statement in the script, rather than this method. condition Optional. A string containing a JavaScript statement to be used as a condition. If the statement evaluates to true or nonzero when this point is reached, execution stops. clearbp $.clearbp ([line]) Removes a breakpoint from the current script. Returns undefined. line gc $.gc () Optional. The line at which to clear the breakpoint. If 0 or not supplied, clears the breakpoint at the current line number. Initiates garbage collection. Returns undefined. getenv $.getenv (envname) Returns the value of the specified environment variable, or null if no such variable is defined. envname The name of the environment variable. list $.list ([classname]) Collects object information into a table and returns this table as a string. See the following "Object statistics" section. classname Optional. The type of object about which to collect information. If not supplied, collects information about all objects currently defined. setbp $.setbp ([line, condition]) Sets a breakpoint in the current script. Returns undefined. If no arguments are needed, it is recommended that you use the JavaScript debugger statement in the script, rather than this method. line Optional. The line at which to stop execution. If 0 or not supplied, sets the breakpoint at the current line number. condition Optional. A string containing a JavaScript statement to be used for a conditional breakpoint. If the statement evaluates to true or nonzero when the line is reached, execution stops.

  • 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

56
Using ExtendScript Tools and Features
Adobe InDesign CS2 Scripting Guide
objects
Number
The total count of all JavaScript objects defined so far. Read only.
os
String
The current operating system version. Read only.
screens
Array
An array of objects containing information about the display screens attached to
your computer. Each object has the properties
left
,
top
,
right
, and
bottom
,
which contain the four corners of each screen in global coordinates. A property
primary
is
true
if that object describes the primary display.
strict
Boolean
When
true
, any attempt to write to a read-only property causes a runtime error.
Some objects do not permit the creation of new properties when
true
.
version
String
The version number of the ExtendScript engine as a three-part number and de-
scription; for example: “3.6.5 (debug)” Read only.
Dollar ($) object functions
about
$.about ()
Displays the About box for the ExtendScript component, and returns
the text of the About box as a string.
bp
$.bp ([
condition
])
Executes a breakpoint at the current position. Returns
undefined
.
If no condition is needed, it is recommended that you use the
JavaScript
debugger
statement in the script, rather than this method.
condition
Optional. A string containing a JavaScript statement to be used as a condition. If the
statement evaluates to
true
or nonzero when this point is reached, execution stops.
clearbp
$.clearbp ([
line
])
Removes a breakpoint from the current script. Returns
undefined
.
line
Optional. The line at which to clear the breakpoint. If 0 or not supplied, clears the
breakpoint at the current line number.
gc
$.gc ()
Initiates garbage collection. Returns
undefined
.
getenv
$.getenv (
envname
)
Returns the value of the specified environment variable, or
null
if no
such variable is defined.
envname
The name of the environment variable.
list
$.list ([
classname
])
Collects object information into a table and returns this table as a
string. See the following “Object statistics” section.
classname
Optional. The type of object about which to collect information. If not supplied, col-
lects information about all objects currently defined.
setbp
$.setbp
([
line
,
condition
])
Sets a breakpoint in the current script. Returns
undefined
.
If no arguments are needed, it is recommended that you use the JavaS-
cript
debugger
statement in the script, rather than this method.
line
Optional. The line at which to stop execution. If 0 or not supplied, sets the breakpoint
at the current line number.
condition
Optional. A string containing a JavaScript statement to be used for a conditional
breakpoint. If the statement evaluates to
true
or nonzero when the line is reached,
execution stops.