You're going to have to use AppleScript / VB for that...
hi, do u have the script? thanks
How are you going to know which process is running and what documents are open in it? If this is to close a PDF after export then you have the option NOT to auto open…
After exporting to PDF, I want it to auto open Reader/Acrobat to check on the PDF, after which a click on a button to close both InDesign page and PDF together.
That may actually turn out to be more trouble than its worth… Once the pdf has auto-opened Acrobat is the frontmost process and your 'button' to close documents in both apps will need to be at the front of these… Are you mac or pc?
Am on pc.
Here is an example:
#target indesign var acroScript = 'var d = app.activeDocs;\r'; acroScript += 'for ( var i in d ) d[i].closeDoc( true );'; var bt = new BridgeTalk; bt.target = "acrobat"; bt.body = acroScript; bt.send();
It closes all open documents in Acrobat without saving. However it works only on PC and only in certain versions of InDesign and Acrobat. (I tested it at work, in InDesign CS3 and Acrobat 8 Pro, on Windows XP)
But at home computer I have Acrobat X version 10.1.1 and bridgetalk doesn't "see" it.
Note that closeDoc method has an optional parameter -- bNoSave -- whether to close the document without saving. If false (the default), the user is prompted to save the document if it has been modified. If true, the document is closed without prompting the user and without saving, even if the document has been modified.
Hope this helps.
I copied the code in InDesign scripting panel. Am using InDesign CS4 and Acro 9 Pro.
It doesnt close the Acro.
Probably this won't work in the 2 application.
I don't have CS4 on PC so can't test it myself. But you can make a quick test to find out if BridgeTalk "sees" acrobat:
It should return either acrobat-9.0 or null.
You can also run BridgeTalk.getTargets(); to get the list of messaging-enabled applications.
Here is a thread where this topic is discussed in detail.
it returns null..
You are out of luck then. It won't work.
Ya boy.. :.(