Scripting
Scripting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
AppleScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
VBScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
AS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
JS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
VBS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
DOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
. . . . . . . . . . . . 13
. . . . . . . . . . . . . . . . . . . . . . . . 14
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
AS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
JS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
VBS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
JS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
VBS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
18
19
19
19
21
21
21
22
22
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
24
24
25
Tell AS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
AppleScript VBScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AppleScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AppleScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AppleScriptAS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
VBScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
VBScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
VBScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
32
32
32
32
35
35
35
36
Adobe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
40
41
42
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
if else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
AppleScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
ESTK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
VBScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
AppleScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
VBScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Adobe
Adobe
1
Adobe Photoshop Adobe InDesign
Adobe
Mac OS
X
AppleScript
JavaScript
Windows
X
JavaScript
AppleScript
AppleScript Apple
1
AppleScript Mac OS Apple
Mac OS
/ /AppleScript/
VBScript
VBScript Microsoft Visual Basic ActiveX
Scripting CS6 Visual Basic
VBScript VBA Visual Basic
VBScript Microsoft Office
Visual Basic Editor Visual Basic Editor
JavaScript
JavaScript Web
AppleScript JavaScript
: ExtendScript JavaScript
ExtendScript Adobe
2 JavaScript
.js .jsx
Windows Mac OS
JavaScript
Startup Scripts
.jsx
JavaScript Adobe
ESTKExtendScript Tool KitESTK
ESTK
2
ESTK
JavaScript
: 5
AS
1. Adobe
2.
JS
1. ESTK
2. JavaScript Console
app.documents.add()
3.
X
F5
VBS
1. 2 Adobe
2. .vbs create_doc.vbs
3. Windows
Windows OS Mac OS
Adobe
documentAS
makeJS add() VBS Add
AS
JS VBS
Adobe
Adobe
10
DOM
DOM
DOM
Adobe DOM
InDesign Illustrator
Photoshop
ESTK
: DOM
DOM
Photoshop AS art layerJS artLayersVBS ArtLayers
AS
JS
app.documents.layers.add()
VBS
3
X
11
myDoc
8
AS
AS set
to
tell application "Adobe Illustrator CS6"
set myDoc to make document
end tell
JS
JS var =
VBS
VBS Set
=
Set appRef = CreateObject("Illustrator.Application")
Set docRef = appRef.Documents.Add
document
Photoshop AS art layerJS artLayersVBS
ArtLayers
AS
JS
12
VBS
myLayer
myLayer myLayer
: contents
Illustrator CS6
InDesign Photoshop
AS
JS
VBS
Set
Set
Set
Set
appRef = CreateObject("Illustrator.Application")
docRef = appRef.Documents.Add
layerRef = docRef.Layers.Add
frameRef = layerRef.TextFrames.Add
myTextFrame.Contents = "Hello world!"
x c
theDocument myLayer
13
Art Layer
Document docdocRef
layerlayerRef layerRef2
my
myDocmyLayermyTextFrame
myFirstPage
my_first_page
JS VBSAS
channel channels
art layer art layers artLayers
AS documents document 1
JavaScript 0
JS documents[0]
VBS Documents(0)
VBS 1
document layer
AS
14
: AppleScript
14
JS
JavaScript []
app.documents.add()
app.documents[0].layers.add()
app.documents[0].layers[0].textFrames.add()
: JS 0
VBS
VBScript
appRef.Documents.Add
appRef.Documents(1).Layers.Add
appRef.Documents(1).Layers(1).TextFrames.Add
AS 1 2
AppleScript
JS
JS
0 1 3
2
[0]
[1] 2 [2]
[2] [2]
VBS VBS 1
JS
: JS VBS
Open all files in this folder and change the first layers
color to white
: 1
15
: Photoshop art
layer art layers layer set layer sets
art layer layer set layers
InDesign rectangle rectangles
text frame text frames rectangle
text frame page items
page items
)
X
AS current
current
current
current
current
document
layer
channel
view
JS active JS
activeDocument
activeLayer
activeChannel
activeView
X
VBS JS
ActiveDocument
ActiveLayer
ActiveChannel
ActiveView
16
AS
JS
app.documents.add()
app.activeDocument.layers.add()
: activeDocument s
VBS
: ActiveDocument s
1.
2.
3.
true false
: /
X
Adobe
21
17
ASJS VBS
x y
AS JS VBS
Z
AS {}
JS []
VBS Array: Array()
Z
AS
JS
VBS
AS
JS
VBS
AS
AS set of
layer name
tell application "Adobe Illustrator CS6"
set myDoc to make document
set myLayer to make layer in myDoc
set name of myLayer to "My New Layer"
end tell
properties 1
/ :
properties
tell application "Adobe Illustrator CS6"
set myDoc to make document
set myLayer to make layer in myDoc
set properties of myLayer to {name:"My New Layer", visible:false}
end tell
18
JS
JS
.=
JS 1 properties
{}
: /
,
var myDoc = app.documents.add()
var myLayer = myDoc.layers.add()
myLayer.properties = {name:"My New Layer", visible:false}
19
VBS
VBS .
=
Set appRef = CreateObject("Illustrator.Application")
Set myDoc = appRef.Documents.Add
Set myLayer = myDoc.Layers.Add
myLayer.Name = "My First Layer"
1 1
Adobe name
save as 23
Documents
AS
AS display dialog ()
count
: document documents
20
documents
myName myName
tell application "Adobe Photoshop CS6"
set myDoc to make document
set myName to name of myDoc
display dialog myName
end tell
JS
JS alert ()
alert() alert
length
documents
: document
documents
alert(app.documents.length)
var myDoc = app.documents.add()
alert(app.documents.length)
VBS
VBS MsgBox ()
MsgBox MsgBox
Count
Documents
: Document
Documents
Set appRef = CreateObject("Photoshop.Application")
MsgBox(appRef.Documents.Count)
Set myDoc = appRef.Documents.Add
MsgBox(appRef.Documents.Count)
21
landscape portrait 2
verticaluprighthorizontalon its side
:
3
AS
AS
dark green
tell application "Adobe Illustrator CS6"
set myDoc to make document
set myLayer to make layer in myDoc
set layer color of myLayer to dark green
end tell
: dark green
set layer color of myLayer to "dark green"
JS
JS .
Adobe
X
InDesign :
Z
UIColor
var myDoc = app.documents.add()
var myLayer = mydoc.layers.add()
myLayer.layerColor = UIColor.darkGreen
22
Illustrator :
Z
RulerUnits
var myDoc = app.documents.add()
myDoc.rulerUnits = RulerUnits.Centimeters
BlendModes
var myDoc = app.documents.add()
var myLayer = myDoc.layers.add()
myLayer.blendingMode = BlendModes.COLORBURN
X
Photoshop
Z
LayerKind
var myDoc = app.documents.add()
var myLayer = mydoc.artLayers.add()
myLayer.kind = LayerKind.TEXT
VBS
VBS
Set appRef = CreateObject("Photoshop.Application")
Set docRef = appRef.Documents.Add
Set layerRef = docRef.ArtLayers.Add
layerRef.Kind = 2
3 x 5
1
AS
JS
VBS
23
: MsgBox Adobe
Windows
ASVBS JS
print/print()/PrintOut /
AS
AS
JS
JS ()
app.activeDocument.print()
VBS
VBS
Set appRef = CreateObject("Photoshop.Application")
appRef.ActiveDocument.PrintOut
24
merge
{}
AS
tell application "Adobe InDesign CS6"
set myDoc to make document
set myLayer to make layer in myDoc
set myLayer2 to make layer in myDoc
merge myLayer2 with {myLayer}
end tell
JS
VBS
25
AS
AS 2
X
make
document
make document
2
location name
JS
JS
: 3
undefined 4000
5000 72My Document
Photoshop CS6
app.documents.add(4000, 5000, 72, "My Document", NewDocumentMode.BITMAP)
: undefined
app.documents.add(4000, 5000)
Tell AS 26
VBS
VBS
undefined 4000
5000 72My Document
Photoshop CS6
Set appRef = CreateObject("Photoshop.Application")
Set myDoc = appRef.Documents.Add(4000, 5000, 72, "My Document", 5)
: undefined
undefined
Tell AS
AppleScript /
tell application " "
end tell
tell tell
tell
tell
tell
27
AS toJS VBS
= layerRef
2 layerRef
AS
AS set
tell application "Adobe Illustrator CS6"
set docRef to make document
set layerRef to make layer in myDoc with properties {name:"First Layer"}
set layerRef to make layer in myDoc with properties {name:"Second Layer"}
end tell
JS
JS = var
var
var docRef = app.documents.add()
var layerRef = myDoc.layers.add()
layerRef.name = "First Layer"
layerRef = myDoc.layers.add()
layerRef.name = "Second Layer"
VBS
VBS Set
Set appRef = CreateObject("Illustrator.Application")
Set docRef = appRef.Documents.Add
Set layerRef = docRef.Layers.Add
layerRef.Name = "First Layer"
layerRef = docRef.Layers.Add
layerRef.Name = "Second Layer"
28
AS
JS
VBS
2
X
1 1
AS
AS 1 2 --
(* *)
tell application "Adobe InDesign CS6"
--This is a single-line comment
print current document --this is a partial-line comment
--the hyphens hide everything to their right from the scripting engine
(* This is a multi-line
comment, which is completely
ignored by the scripting engine, no matter how
many lines it contains.
The trick is to remember to close the comment.
If you dont the rest of your script is
hidden from the scripting engine!*)
end tell
JS
29
JS 1 2 //
/* */
//This is a single-line comment
app.activeDocument.print() //this part of the line is also a comment
/* This is a multi-line
comment, which is completely
ignored by the scripting engine, no matter how
many lines it contains.
Don?t forget the closing asterisk and slash
or the rest of your script will be commented out...*/
VBS
'This is a comment.
Set appRef = CreateObject("Photoshop.Application")
Rem This is also a comment.
appRef.ActiveDocument.PrintOut 'This part of the line is a comment.
' This is a multi-line
' comment that requires
' a comment marker at the beginning
' of each line.
Rem This is also a multi-line comment. Generally, multi-line
Rem comments in VBS are easier for you to identify (and read) in your scripts
Rem if they begin with a single straight quote (') rather than if they begin
Rem with Rem, because Rem can look like any other text in the script
' The choice is yours but isn?t this more easily
' identifiable as a comment than the preceding
' four lines were?
AppleScript VBScript
AppleScript VBScript 1
: 1
AS
Option+Return
tell application "Adobe InDesign CS6"
set myDoc to make document
set myLayer to make layer in myDoc with properties {name:"My First Layer"} at the
beginning of myDoc (* without the line break character, AS would consider this
line an incomplete statement*)
(* note that line continuation characters are not required in a multi-line comment
such as this one*)
set myLayer2 to make layer in myDoc with properties {name:"My Other Layer"}
before myLayer
end tell
VBS
30
_
: 2
: JavaScript
ExtendScript
VBScript JavaScript
1 JavaScript myFiles 4
clouds.gif
open(myFiles[1])
VBScript
Dim myFiles (4)
myFiles(0) = "clouds.bmp"
myFiles(1) = "clouds.gif"
myFiles(2) = "clouds.jpg"
myFiles(3) = "clouds.pdf"
appRef.Open myFiles(1)
AS
JS
app.documents.add()
VBS
31
make AS
add() JS
Add VBS
Adobe
44
Adobe
Adobe
Adobe PDF CD
Adobe
AppleScript
AppleScript Apple
AppleScript
: /AppleScript/
1.
Adobe
2. Adobe
AppleScriptAS
AS
1.
2.
:
32
33
3.
Z
anything
Can return:
/
r/o
1.
2.
3.
Can return:
AppleScript
40 Adobe
34
1.
2.
:
[ ]
Can accept:/
1.
2.
3.
[ ]
Can accept:
35
JavaScript
Adobe ExtendScript Tools KitESTKAdobe
JavaScript
Adobe JavaScript
JavaScript
VBScript
Microsoft Office Visual Basic Adobe
VBScript
:
VBScript
VBS
1. Microsoft Office Visual Basic Editor
2. Visual Basic Editor
OK
3. Creative Suite
4. Visual Basic
5. Adobe
CS6
36
VBScript
VBS
Adobe
Photoshop CS6 Ps
PsColorProfileTypePsBitsPerChannelType
InDesign CS6 id
idRenderingIntentidPageOrientation
Adobe Illustrator CS6 Ai
AiCropOptionsAiBlendModes
Z
37
1.
VBS Kind
2 TextLayer
Set appRef = CreateObject("Photoshop.Application")
Set docRef = appRef.Documents.Add
Set layerRef = docRef.ArtLayers.Add
layerRef.Kind = 2 'PsTextLayer
38
1.
2.
39
[ ]
1.
[ ]
Adobe
40
Adobe
CD
AS
AS
1
InDesign document
character style
indexnamerangerelativesatisfying a testID
layer
indexnamerangerelativesatisfying a testID
story
indexnamerangerelativesatisfying a testID
document
character stylelayer story
Adobe
41
bounds
kind
LayerKind
name
string
opacity
number (double)
0.0 100.0
textItem
TextItem
visible
Boolean
true
AS
: bounds
Adobe
JS
VBS
42
: JS VBS
documents.layers
layers.textFrames
NewDocumentMode DocumentFill
[]
Document
Adobe
43
add
[width]
[, height]
[, resolution])
[, name]
[, mode])
[, initialFill]
[, pixelAspectRatio])
UnitValue
UnitValue
number (double)
string
NewDocumentMode
DocumentFill
number (double)
Document
(pixelAspectRatio
0.10 10.00
width height
UnitValue
5 7
AS
JS
app.documents.add(5, 7)
VBS appRef.Documents.Add(5, 7)
X
mode initialFill
AS
JS
VBS
if
Adobe
1
if
if
1
1
65%
AS
AS if if then if end if
: AS =
Ducky.tif if
JS
JS if if if {}
44
45
: JavaScript ===
Ducky.tif if
VBS
: VBS
Ducky.tif if
if else
1
50 2
65 if else
AS
JS
VBS
46
Adobe 9
DOM layer
true
AS
myLayerCount myCounter 2
1
JS
for JavaScript 1
AppleScript myLayerCount myCounter 2
1
for 3 myCounter++ ++ 1
1
47
for
1. myCounter 0
2. myCounter myLayerCount myLayer
myCounter myLayer true
:
object x
Set appRef = CreateObject("Illustrator.Application")
Set myDoc = appRef.ActiveDocument
For Each x in myDoc.Layers
x.Visible = True
Next
Adobe
Adobe 6
ESTK
true false
AS
tell
end
with
set
JS
var
if
else
with
VBS
Dim
Set
MsgBox
48
AppleScript
49
AppleScript
AppleScript
: 1
ESTK
ESTK
X
ESTK
JavaScript
artLayer
VBScript
50
JavaScript
Shift+F5
JavaScript
element is undefined
var
app
VBScript
VBScript Windows
AppleScript
AppleScript
X AppleScript for the Internet: Visual QuickStart GuideEthan Wilde Peachpit Press
1998 ISBN 0-201-35359-8
X AppleScript Language Guide: English DialectApple Inc. Addison-Wesley Publishing Co.
1993 ISBN 0-201-40735-3
X Danny Goodman's AppleScript Handbook 2 Danny Goodman iUniverse 1998
ISBN 0-966-55141-9
X
JavaScript
JavaScript
X JavaScript: The Definitive GuideDavid Flanagan OReilly Media Inc. 2002
ISBN 0-596-00048-0
X JavaScript BibleDanny Goodman Hungry Minds Inc. 2001 ISBN 0-7645-4718-6
X Adobe ScriptingChandler McWilliams Wiley Publishing, Inc. 2003 ISBN 0-7645-2455-0
VBScript
VBScript VBA
X Learn to Program with VBScript 6
John Smiley Active Path 1998
ISBN 1-902-74500-0
X Microsoft VBScript 6.0 ProfessionalMichael Halvorson Microsoft Press 1998
ISBN 1-572-31809-0
X VB & VBA in a Nutshell
Paul Lomax O'Reilly 1998 ISBN 1-56592-358-8
X
51
AppleScript
Web , 51
var, 11
VBScript
, 8
, 6
, 32
, 8
, 8
, 35
, 6
D
DOM
, 10
, 10
, 5
, 19
ESTK
JS , 35
, 7
, 49
ExtendScript
, 7
, 13
, 14
I
if else , 45
if , 44
IllustratorAdobe Illustrator
J
JavaScript
, 15
, 8
, 7
, 7
JavaScript , 7
AS , 32, 34
VBS , 36
, 15
, 10
, 15
, 13
, 10
, 9
, 40
, 9
, 13
, 10
, 7
tell AS, 26
AS , 32, 34
, 23
, 23
, 28
52
53
, 51
, 23, 24
, 9
, 44
, 16
AS , 32
VBS , 36
, 16
, 41
, 16
, 9
, 17
, 19
, 19
, 5
, 6
, 6
, 7
AppleScript , 32
, 6
, 49
, 28
, 19
, 16
, 32
, 21
, 16
, 11
, 27
, 28
, 11
, 11
, 16
, 22
, 12
, 10, 12
, 40
, 29
, 5
, 30
, 30
, 17
, 24
, 24
, 42
AS, 25
, 9
, 24
, 25
AS, 25
VBS , 39
, 23
, 42
, 9
, 23
54
, 16
, 40
, 46
, 21
, 16