-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathchange-text.jsx
More file actions
35 lines (18 loc) · 820 Bytes
/
change-text.jsx
File metadata and controls
35 lines (18 loc) · 820 Bytes
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
var myProject = app.project;
var myComposition = myProject.items.addComp("happy_holidays", 1920, 1080, 1.0, 5, 24);
var myTextLayer = myComposition.layers.addText("new_text_layer");
var myTextDocument = myTextLayer.property("ADBE Text Properties").property("ADBE Text Document")
var textDocument1 = myTextDocument.value;
myString = "Happy holidays!";
textDocument1.resetCharStyle();
textDocument1.fontSize = 60;
textDocument1.fillColor = [1, 0, 0];
textDocument1.strokeColor = [0, 1, 0];
textDocument1.strokeWidth = 2;
textDocument1.font = "TimesNewRomanPSMT";
textDocument1.strokeOverFill = true;
textDocument1.applyStroke = true;
textDocument1.applyFill = true;
textDocument1.text = myString;
textDocument1.justification = ParagraphJustification.CENTER_JUSTIFY;
myTextDocument.setValue(textDocument1);