Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Close ALL - No Save

New Here ,
Aug 12, 2010 Aug 12, 2010

Alt+Ctrl+W  closes all documents if a modification was made a warning shows up asking to save or no.

My action "Close All-No Save" takes care of this but the action was written for 8 documents then if only 4 documents are open and playing the action

the dialog Continue or Stop shows up and one must click Stop.

Can a script close all open documents without saving regardless how many are open. An action would call the script and the clicking on the Stop in the dialog

would be not required.

I know not a big deal to click on stop but if it can be avoided why not?

TOPICS
Actions and scripting
9.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Aug 12, 2010 Aug 12, 2010

was.close(AnswerOptions.DONOTANSWER)…

Translate
Adobe
Guide ,
Aug 12, 2010 Aug 12, 2010

Then calling this may do what you wish…

#target photoshop while(app.documents.length > 0)      {      app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);      }

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 12, 2010 Aug 12, 2010

I can see in the script that it will work.

I am not on my working machine but will try it tonoght.

Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 12, 2010 Aug 12, 2010

Works Perfect!

First I loaded the script with # target Photoshop and got an error then without this line it worked.

Great thank you very much

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 12, 2010 Aug 12, 2010

Photoshop CS5 has amenu item File>Close all when the prompt come up there is a check box you can check to have the your no save answer apply to all. You can use that in an action.  Also Trevor Morris has many free scripts on his web site one is Close ALL Without Saving http://morris-photographics.com/photoshop/scripts/close-without-save.html

JJMack
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 12, 2010 Aug 12, 2010

was.close(AnswerOptions.DONOTANSWER)…

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 12, 2010 Aug 12, 2010

New to this new layout.

Do I need to click on the buttons Helful or Correct Answer befor I reply. Want to do things right.

Have not tried it but as I mentioned before the script looks like that your answer is correct.

Late tonight New York Time I will chck it out

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 12, 2010 Aug 12, 2010

Not only close you were dead on.

Thanks for the help

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 12, 2010 Aug 12, 2010

I am still working in CS. The reason for it is being a much leaner program it is faster for what I do which is Events (take 3 pictures run an action inserting them in saved selections and print.

Will go to Trevor's Site . I know him from the PS forum since many years back and am aware of his abilities and knowledge.

Thank you for the info.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 12, 2010 Aug 12, 2010

I am using Puppet Mark's Script now but also downloaded Trevor Morris;s CS2 Script.

This script would be very handy for me if the Dialog Box could be made sticky after selecting an option.

Contacted Trevor with this request.

Thanks for your hints.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 13, 2010 Aug 13, 2010

Im sure Paul will let you know how to make a dialog selection sticky… I've seen this before in his scripts…

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 12, 2010 Aug 12, 2010

If you're feeling a bit more lazy, you can create an action by recording as you close an image and don't save it.  Then just use batch and run the action on all open files.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 13, 2010 Aug 13, 2010

In the height of laziness (er I mean efficiency) I recently wrote this script that closes all documents EXCEPT the one that you've got selected, useful if you find yourself in a situation where you're looking at lots of images and wondering which one to choice, select it and instantly disregard all the rest. Not that this happens frequently but I was curious write such a thing.

//close everything else execept the current document

//pref pixels
app.preferences.rulerUnits = Units.PIXELS;

// make a copy of the array
var docs = new Array();
for (i=0; i < app.documents.length;  i++) {
docs = app.documents;
}

// call the selected document that you want to keep open
var selectedDoc = app.activeDocument;


//alert (docs.length + " number of docs open")


//run a loop for all the open documents
for (i=0; i < docs.length;  i++) {

// if this isn't the selected document then close it
if (docs != selectedDoc) {

//close that document without saving
docs.close(SaveOptions.DONOTSAVECHANGES);
   }

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 13, 2010 Aug 13, 2010
LATEST

Works perfect.

Photographing Events I want to show 4 pictures. Customer selects the one they like the others are closed. It's here where the script invoked by an action comes in very handy.

Thanks for posting it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines