Skip to main content
Adobe Photoshop Family

7 Messages

 • 

160 Points

Sun, Sep 10, 2017 5:44 PM

3

Open "session" feature

I would like Photoshop to have "Session". For example I would be working with 10 files and need to close and do something else. I would had saved that as "Some Session". Next day I would and could open this same session and all files would open up. 

Also I didn't find way to choose multiple files from "Recent files" view.

Over and out
Thanks

Responses

22 Messages

 • 

356 Points

3 years ago

Nice try, but I'm not sure, I would like that.

Champion

 • 

1.6K Messages

 • 

24.9K Points

3 years ago

I think there was a thread on this already but I cannot locate it currently. 

Storing a list of the currently open files and using that data to open them later on could be done with Scripts already. (Edit: provided the files will not have been moved)
The problem is window positions and Viewing parameters. 

952 Messages

 • 

15.3K Points

3 years ago

Session is restored if your Photoshop crashed and autosave is turned on.

So... it could work if you will not save anything and you kill Photoshop process :-D :-D

7 Messages

 • 

160 Points

3 years ago

haha, Will this cool crash also support multiple sessions. ;)

952 Messages

 • 

15.3K Points

Maybe if you create multiple Mac/Windows user accounts for each session :-D

7 Messages

 • 

160 Points

Or fast ways with out crashing would be probably use "folders" in bridge and choose multiple files from bridge and they would open to photoshop.  

But then again...Would love it to be in PHotoshop as it would be faster. ;)
Also session based windows settings!  :)

952 Messages

 • 

15.3K Points

You could ask Doco plugin authors for feature request:
http://creativedo.co/doco

I don't think that Adobe will implement it soon.

Champion

 • 

1.6K Messages

 • 

24.9K Points

That hardly needs a proper plugin, a fairly simple Script (or two) should suffice. 

952 Messages

 • 

15.3K Points

It deppends how much sessions you want manage. E.g. if you want divide all opened documents into three sessions you need advanced UI.

Anyway reopen all documents from last Photoshop usage is very simple.

952 Messages

 • 

15.3K Points

I suggest use: "putCustomOptions" instead saving in text file. It's clearer approach I think.

4 Messages

 • 

100 Points

3 years ago

Similar to Safari "reopen all windows from last session" - I think that's a great idea. Not sure about CPU/memory handling - but I do like the idea.

Champion

 • 

1.6K Messages

 • 

24.9K Points

3 years ago

If somebody wants to give it a test I cobbled together a simple dialog for storing lists of files and opening them in JavaScript. 

// dialog for storing lists of open files and opening files from lists;// 2017; use it at your own risk;
#target photoshop
// get list if txt-file exists;
var thePath = String($.fileName).slice(0, String($.fileName).lastIndexOf("/")) + "/" + "openfiles.txt";
if (File(thePath).exists == true) {
var theText = readPref (thePath);
var theseFiles = theText.split("\r");
var theFiles = new Array;
for (var a = 0; a < theseFiles.length; a++) {theFiles.push(theseFiles[a].split(","))};
}
else {
var theFiles = [["___"]];
};
////////////////////////////////////
var theSelected = selectAThing(theFiles, thePath);
if (theSelected != null) {
var theFails = new Array;
// open files;
for (var m = 1; m < theSelected.length; m++) {
try {app.open(File(theSelected[m]))}
catch (e) {theFails.push(theFiles[m])};
if (theFails.length > 0) {alert ("the following files could not be opened\n"+theFails.join(", "))}
};
};
////////////////////////////////////
////// read prefs file //////
function readPref (thePath) {
  if (File(thePath).exists == true) {
    var file = File(thePath);
    file.open("r");
    file.encoding= 'BINARY';
    var theText = new String;
    for (var m = 0; m < file.length; m ++) {
      theText = theText.concat(file.readch());
      };
    file.close();
    return String(theText)
    }
  };
////// function to write a preference-file storing a text //////
function writePref (theText, thePath) {
  try {
    var thePrefFile = new File(thePath);
    thePrefFile.open("w");
    for (var m = 0; m < theText.length; m ++) {
      thePrefFile.write(theText[m])
      };
    thePrefFile.close();
return true
    }
  catch (e) {return "fail"};
  };
////// select dialog //////
function selectAThing (theFiles, thePath) {
var theList = new Array;
for (var m = 0; m < theFiles.length; m++) {
theList.push(theFiles[m][0])
};
var dlg = new Window('dialog', "sessions", [500,300,820,410]);
dlg.pathSel = dlg.add('dropdownlist', [12,13,306,35], (theList));
dlg.pathSel.selection = dlg.pathSel[0];
dlg.deleteBtn = dlg.add('button', [13,42,158,52], 'delete');
dlg.newBtn = dlg.add('button', [168,42,313,52], 'add');
dlg.cancelBtn = dlg.add('button', [13,72,158,82], 'Cancel', {name:'cancel'});
dlg.buildBtn = dlg.add('button', [168,72,313,82], 'OK', {name:'ok'});
////////////////////////////////////
dlg.newBtn. function () {
if (app.documents.length > 0) {
var theNewName = prompt("please enter name");
while (theNewName.indexOf(",")!=-1) {theNewName.replace(",","_")};
// collect fullnames of open images;
var pathArray = new Array;
var unsaved = new Array;
for (var n = 0; n < app.documents.length; n++) {
try {
pathArray.push(app.documents[n].fullName)
}
catch (e) {
app.activeDocument = app.documents[n];
tifOpts = new TiffSaveOptions() ;
tifOpts.embedColorProfile = true;
tifOpts.imageCompression = TIFFEncoding.TIFFLZW;
tifOpts.alphaChannels = true;
tifOpts.byteOrder = ByteOrder.MACOS;
tifOpts.layers = true ;
app.documents[n].saveAs((new File("~/Desktop/"+app.documents[n].name+".tif")), tifOpts, false);
pathArray.push(app.documents[n].fullName);
unsaved.push(app.documents[n].name)
}
};
if (unsaved.length > 0) {alert (unsaved.join(", ")+" seem/s to have been unsaved")};
// write the list;
theFiles.push(theNewName+","+pathArray.join(","));
writePref (theFiles.join("\n"), thePath);
dlg.pathSel.add("item", theNewName)
}
};
////////////////////////////////////
dlg.deleteBtn. function () {
var theNew = new Array;
for (var n = 0; n < theFiles.length; n++) {
if (n != dlg.pathSel.selection.index) {
theNew.push(theFiles[n])
}
};
theFiles = theNew;
dlg.pathSel.remove(dlg.pathSel.selection.index);
dlg.pathSel.selection = dlg.pathSel[0];
writePref (theFiles.join("\r"), thePath);
};
////////////////////////////////////
var myReturn = dlg.show ();
// if ok;
if (myReturn == true) {return theFiles[dlg.pathSel.selection.index]} 
else {return null}
};