Hey there, long ago I made this script with some help but right now I totally forget all about scripting and I need a little update.
What it does is just combining several layers into a smart object, and rename it to the bottom layer. Now, if possible I want to copy the layer's color as well. Can someone help me achieve this?
This is the script
`function main() {
var s2t = stringIDToTypeID;(tr = new ActionReference).putProperty(s2t('property'), p = s2t('targetLayersIDs'));
tr.putEnumerated(s2t('document'), s2t('ordinal'), s2t('targetEnum'));(lr = new ActionReference).putProperty(s2t('property'), n = s2t('name'));
lr.putIdentifier(s2t('layer'), executeActionGet(tr).getList(p).getReference(0).getIdentifier(s2t('layerID')));
var nm = executeActionGet(lr).getString(n)executeAction(s2t('newPlacedLayer'), undefined, DialogModes.NO);
(r = new ActionReference()).putEnumerated(s2t("layer"), s2t("ordinal"), s2t("targetEnum"));
(d = new ActionDescriptor()).putReference(s2t("null"), r);
(d1 = new ActionDescriptor()).putString(s2t("name"), nm);
d.putObject(s2t("to"), s2t("layer"), d1);
executeAction(s2t("set"), d, DialogModes.NO);
}app.activeDocument.suspendHistory("Smart Obj Script", "main()");`
I also found this post which should help I think but I am unable to apply it on my script.
Help really appreciated, thanks :)