Skip to content

Instantly share code, notes, and snippets.

@Hoikohroh
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hoikohroh/e68f1c32d2d7373994a2 to your computer and use it in GitHub Desktop.
Save Hoikohroh/e68f1c32d2d7373994a2 to your computer and use it in GitHub Desktop.
Adobe Photoshop Script: Close unselected documents.
var Doc = app.activeDocument;
for (var i = (app.documents.length - 1); i >= 0; i --){
var chkDoc = app.documents[i];
if (chkDoc !== Doc){
//!! Important !! Mode: DONOTSAVECHANGES !!//
chkDoc.close(SaveOptions.DONOTSAVECHANGES);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment