I Need Help with Scripts. get multi Format of textItem

Community Beginner ,
Jun 07, 2021 Jun 07, 2021

Copy link to clipboard

Copied

I'm working on a PS Java Scripts tool, and I can get infomation of sentence with severor colors and outline format using code of bellow.

var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var layerDesc = executeActionGet(ref);
var effectDesc = layerDesc.getObjectValue(charIDToTypeID("Lefx"));

I think next step i need to get list of info with start index ,end index, color and other  infos, but i do not known how. Can anyone help me. 

Thanks a lot~

TOPICS
Actions and scripting

Views

616

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 08, 2021 Jun 08, 2021

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 12, 2021 Jun 12, 2021

Copy link to clipboard

Copied

Have you managed to achieve the task yet? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

Yes, get Json info about property. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

I found an answer in other post, but ow i can't find the links... The code is here.

var r = new ActionReference();
var d = new ActionDescriptor();

r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("json"));
r.putEnumerated(stringIDToTypeID("document"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
d.putReference(stringIDToTypeID("null"), r);

d.putBoolean(stringIDToTypeID("includeAncestors"), false);
d.putBoolean(stringIDToTypeID("getTextStyles"), true)

d.putBoolean(stringIDToTypeID("selectedLayers"), true);var json= executeAction(stringIDToTypeID("get"), d, DialogModes.NO).getString(stringIDToTypeID("json"));

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

LATEST

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines