Hi,
I vaguely recalled to have asked about this in the past (although my memory could fail me), but I can't find the post, maybe it was on ps-scripts.com
I'd need to pack into a single ActionManager step a "merge layer on top" (command + shift + option + E) with the layer name set.
My (unsuccessful) take is:
function s2t (s) { return app.stringIDToTypeID(s) } var d1 = new ActionDescriptor(); d1.putBoolean(s2t('duplicate'), true); // trying to set the name ======= var d2 = new ActionDescriptor(); d2.putString( s2t('name'), "some name"); d1.putObject(s2t('using'), s2t('layer'), d2); // ====== executeAction(s2t('mergeVisible'), d1, DialogModes.NO);
Alas always the default name (which depends on the existing layers) is used.
I know it's not the end of the world to divide into 2 steps but... ;-)
Thanks in advance for any suggestion,
Davide