From an absolute beginner in both InDesign and java scripting . . .
With an InDesign CS6 document already open on my PC . . . can I get the path out of the opened file and save some/all the route folders/sub-folders and document name as variables with javascript?
Path is like this:-
\\mainserver\PDFWorkflow\Ads\County\GDS\InDesign\Adverts\225501IP.indd
Why? Because I want to write a script that gives me a Place dialogue box using some of the variables from the original path. Place dialgoue script would have a path something like this:- \\mainserver\PDFWorkflow\Ads\variable\GDS\InDesign\Resources\variable
app.activeDocument.filePath
returns the document's path. This works only on saved documents.
If you want to do any kind of file handling, you should read chapter 3 on file system access in the "JavaScript Tools Guide CS6". Fire up the ESTK and open the Help menu; you'll see the document in that menu.
Peter
North America
Europe, Middle East and Africa
Asia Pacific