0 Replies Latest reply on Mar 17, 2009 4:11 AM by hm_arul

    Adobe InDesign is shutting down. A serious error was detected

    hm_arul Level 1
      Dear scripters

      here I am trying to relink the book contents from different path. While I am running this script my indesign cs2 is shutting down.

      the error is below

      ---------------------------
      Adobe InDesign
      ---------------------------
      Adobe InDesign is shutting down. A serious error was detected. Please restart InDesign to recover work in any unsaved InDesign documents.
      ---------------------------
      OK
      ---------------------------

      This is my script

      var myFolder = Folder.selectDialog("Please select a folder");

      bb = app.books[0].bookContents;

      for (i = 0; i < bb.length; i++)

      {

      chname= File(bb[i].fullName).name;

      mynewfile = File(myFolder + "/" + chname);

      if (mynewfile.exists) {

      bb[i].replace (File (mynewfile));

      $.writeln (mynewfile)

      app.books[0].save();

      }

      }

      Please advice me how to solve this prob?

      thanks in advance

      regards
      a r u l