You should be just a little bit more concrete.How should the script point to an InDesign document? You mean open a particular document. And what kind of information do you want to extract?
I mean open an Indesign document and extract data from a particular layer. For example, I would have a layer called "Spot" and on this layer would be all copy blocks that I will need exported into a text file? If I didn't have to open the document, it would be even better...Does that make sense? Thank you
You have to open a document to be able to script it. I would first start with an open document and if this works open documents of a particular folder for example.
Try something like this:
var myFormat = ExportFormat.textType;
var myExtension = ".txt";
for(i = 0; i < app.activeDocument.stories.length; i++)
myStory = app.activeDocument.stories.item(i);
myID = myStory.id;
myFileName = "StoryID" + myID + myExtension;
myFilePath = myFolder + "/" + myFileName;
myFile = new File(myFilePath);
This will save your stories into text files. If this is what you want.