What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Reply to thread

Layer ID's are unique to each layer and amending this field could cause problems.

[code]

alert(activeDocument.activeLayer.id);

[/code]

There is a layer metadata field that holds the time of the last update of the layer I.E.

[code]

alert(layerTime());


function layerTime(){

var ref = new ActionReference();

ref.putProperty(charIDToTypeID("Prpr"),stringIDToTypeID("metadata"));

ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );

var lt = executeActionGet(ref).getObjectValue(stringIDToTypeID("metadata")).getDouble(stringIDToTypeID("layerTime"));//seconds

return new Date(lt*1000.0).toLocaleString(); //change to milliseconds

};

[/code]


Good luck with your project.


What is our favorite program/app? (Hint - it begins and ends with the letter P)
Back
Top