2 Replies Latest reply on Jun 18, 2009 11:42 PM by R_Thangaraj

    how to show the dialogs in Indesign?

    R_Thangaraj

      hi to all,

      I tried these script to show the dialogs but it doesn't work at all!

       

      $.writeln(app.dialogs.length);
      app.dialogs.everyItem().destroy();

      //for(var i=0;i<app.dialogs.length;i++)

      //{

      //     app.dialogs[i].destroy();               //These also i tried//

      //}
      var myDialog = app.dialogs.add({name:"Simple Dialog"});
      //Add a dialog column.
      with(myDialog.dialogColumns.add()){
      staticTexts.add({staticLabel:"This is a very simple dialog box."});
      }
      //Show the dialog box.
      var myResult = myDialog.show();
      //If the user clicked OK, display one message;
      //if they clicked Cancel, display a different message.
      if(myResult == true){
      alert("You clicked the OK button.");
      }
      else{
      alert("You clicked the Cancel button.");
      }
      //Remove the dialog box from memory.
      myDialog.destroy();

      i also attaced this script with this forum...

      help me...