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~
Copy link to clipboard
Copied
It seems to be well explained here Action Manager Scripting
Copy link to clipboard
Copied
Have you managed to achieve the task yet?
Copy link to clipboard
Copied
Yes, get Json info about property.
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"));
Copy link to clipboard
Copied