2 Replies Latest reply on Sep 9, 2013 3:35 AM by Bill joy

    File close using script prompt message

    Bill joy Level 1

      Hi Experts,

      I want to close my active docment forcefully wirthout save it.

      when I close it manually then it prompt a message :

       

      Save changes to the Adobe InDesign document "Abc.indd" before closing ?

       

      Don't Save                                                                    Cancel          Save

       

      I press Don't Save button and file close.

      I want to do this process using script.

       

      I use

      #target indesign

      var myDocument=app.activeDocument;

      myDocument.close(1852776480);

       

      where 1852776480 is "Save Option-No" value.

       

      But it do not close my active document.

       

      How close it ?

       

      Thanks.

        • 1. Re: File close using script prompt message
          BEGINNER_X Level 3

          Hi Joy,

          I hope this is your expectations:

           

          app.activeDocument.close(SaveOptions.no)
          

           

          Thanks

          Beginner_X

          • 2. Re: File close using script prompt message
            Bill joy Level 1

            Thanks Beginner_X for reply

             

            I try :

             

            var myDocument=app.activeDocument;

            myDocument.close(1852776480);

             

            SaveOptions.no value is 1852776480.

             

            I think that there is no difference in

             

            app.activeDocument.close(SaveOptions.no)

             

            and

             

            var myDocument=app.activeDocument;

            myDocument.close(1852776480);

             

            In prompted message :

             

            Save changes to the Adobe InDesign document "Abc.indd" before closing ?

             

            Don't Save                                                                     Cancel          Save

             

            I want to say Don't Save using script.

             

            I want to close my modified active document without save using script.

            How close this ?

             

             

            Thanks