var doc = app.activeDocument;
var currentdate = new Date();
var st = new Array();
for (var lr=0;lr<doc.layers[0].layers.length;lr++)
{
st[lr] = "Lauer: " + lr + " Time: " + currentdate.getHours() + ":" +currentdate.getMinutes() + ":" + currentdate.getSeconds();
doc.selection = null;
doc.layers[0].layers[lr].hasSelectedArtwork=true;
app.doScript ("Divide", "PathFinder")
}
var file = new File();
var fileNew = file.saveDlg("Save new file");
fileNew.open("w");
fileNew.write(st);
fileNew.close();