7 Replies Latest reply on Oct 16, 2011 5:50 AM by Muppet Mark

    [CS5 JS] Closing a dialog box with a script

    KeithGilbert Level 1

      I've got a little project that uses a 3rd party plug-in to InDesign CS5 Mac, and the plug-in isn't scriptable. I've written a little script that, after it does a bunch of processing, runs the following:


      try {

          var myMenuAction1 = app.menuActions.item("Create Job...");



      catch (myError) {};


      This snippet opens the "Create Job.." dialog box of the plug-in. Now I just need to be able to close the dialog, which would be done with the keyboard by hitting OK, because the "Create" button that starts the process and closes the dialog is the default button, so hitting return activates it.


      Is there any way to pass a return via scripting so I can get this box to close automatically?


      Thx for any advice!