Answered
Script to open the last closed file.
Hello! How to recover "open" only the last closed document.
It's possible?
Thanks.
Hello! How to recover "open" only the last closed document.
It's possible?
Thanks.
You could try....
#target photoshop;
app.bringToFront();
var f = File(recentFilePaths()[0]);
if(f.exists) open(f); else alert("Sorry " + f.fsName + " does not now exit");
function recentFilePaths(){
var names = [];
var ref = new ActionReference();
ref.putProperty( charIDToTypeID("Prpr"), stringIDToTypeID("recentFiles") );
ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var desc = executeActionGet(ref).getList(stringIDToTypeID("recentFiles"));
for(var a = 0;a<desc.count;a++){
names.push(desc.getPath(a));
}
return names;
};Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.