textDocument Object - Apply Stroke

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
User avatar
2deadfrog
Posts: 3
Joined: February 22nd, 2019, 2:52 am

Hello there. I was trying to apply a stroke to the source text via script with something like this:

Code: Select all

var applyStrokeHere = app.project.item(1).layer(1).property("Source Text").value;
applyStrokeHere.applyStroke = true;
or

Code: Select all

var applyStrokeHere = app.project.item(1).layer(1).property("ADBE Text Properties").property("ADBE Text Document").value;
applyStrokeHere.applyStroke = true;
I thought that it's a read/write value. Am I missing something?

In this case I will no be able to use an animator to apply the stroke.

Thank you!
Jack Morgan
www.2deadfrog.com
jordanwade33
Posts: 16
Joined: December 8th, 2014, 11:11 pm

It is a read/write value, but doesn't update unless you reset the value after you change some of the properties.

This seems to work like I think you intend it to:

Code: Select all

var source = app.project.item(1).layer(1).property("Source Text");
var applyStrokeHere = source.value;
applyStrokeHere.applyStroke = true;
source.setValue(applyStrokeHere);
Post Reply