0
if (!inddLastest.exists) {
    doc.save(inddLastest);
  } else {
    //btnText = { en: "Yes", de: "Ja", fr: "Oui" }; b1 = w.add ("button", undefined, localize (btnText));
    var res = confirm("Die InDesign-Datei existiert bereits. \rSoll sie überschrieben werden?", true, "Problem");
    // if the user hits no, stop the script
    if (res !== true) {
      return; //get out of this function
    } else {
      doc.save(inddLastest); //yes, overwrite
    }
  }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.