2 Replies Latest reply on Sep 22, 2016 5:53 AM by garymx

    Newbie trying to close and then choose another file

    garymx

      Hello,

       

      I'm trying to make a really simple script to just close one file and then open a specific folder so I can choose another. Eventually I want to learn a lot more but even this will save me some work.

       

      The following closes the file and brings up the right folder but when I click on the file I want to open the name appears in the "File Name" box but it doesn't open, and I get an error message. If I specify the file name with the path it opens but I want to be able to choose the file.

       

      app.activeDocument.close(SaveOptions.no);

      File.openDialog("path");

       

      I've searched a lot for an answer but maybe aren't using the right terms?

       

      Thank you

       

      Gary