• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

I Need Help with Scripts. get multi Format of textItem

Explorer ,
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

777

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
People's Champ ,
Jun 08, 2021 Jun 08, 2021

Copy link to clipboard

Copied

It seems to be well explained here Action Manager Scripting

Votes

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 Expert ,
Jun 12, 2021 Jun 12, 2021

Copy link to clipboard

Copied

Have you managed to achieve the task yet? 

Votes

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
Explorer ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

Yes, get Json info about property. 

Votes

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
Explorer ,
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"));

Votes

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
LEGEND ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

LATEST

Votes

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