[CS3] [JS] Export PDF to the same folder as the InDesign file
Hi,
I have written a JavaScript to export an InDesign file to a PDF file.
The exporting works fine when exporting to a specific folder, but I want the script to export the PDF to the SAME folder as the InDesign file.
For example, if the Indesign file is in a folder called "Owner's Manuals", I want the script to save the PDF into the same "Owner's Manuals" folder.
At the moment I have:
var myFolder = Folder.selectDialog ('Choose a Folder');
but this dialog defaults to the Desktop every time, forcing me to click 6-7 times to locate the relevant folder where I want the PDF to be saved, which is a waste of time.
I want the script to do something like the following:
"Find out the location of this InDesign file, and export the PDF to the same folder"
I have searched this forum, as well as the Scripting Reference, but without any luck.
Any suggestions are greatly appreciated.
Thanks.