3 Replies Latest reply on Oct 29, 2015 12:41 PM by MJG123

    About to lose my mind

    MJG123

      Ok, I need help (although my psychiatrist reckons no one can help me. )

      I am new to this of course>

       

      Here is where I am at:

      I was able to write simple javascript code to open a pdf file by clicking a button and then read the info from the source file to populate the destination file.

      It works well - however, the file name and destination is hardcoded ie. I provide the filename and destination:

      var destDoc = app.openDoc('/C/filename.pdf);

       

      Al I want to do is make the filename user selectable ie. the user selects the filename when clicking on the button.

       

      Now I found the File.opendialogue method and tried it. But I get an error. File is not defined.

      var destDoc = File.openDialogue("Please select your file.");

      if (destDoc != null) app.openDoc(destDoc);

       

      I am stuck. Help!