-
1. Re: JS: How to close Adobe reader/Acrobat?
Harbs. Jan 16, 2012 11:38 PM (in response to eboda_snaf)You're going to have to use AppleScript / VB for that...
Harbs
-
2. Re: JS: How to close Adobe reader/Acrobat?
eboda_snaf Jan 17, 2012 12:37 AM (in response to Harbs.)hi, do u have the script? thanks
-
3. Re: JS: How to close Adobe reader/Acrobat?
Muppet Mark Jan 17, 2012 2:56 AM (in response to eboda_snaf)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…
-
4. Re: JS: How to close Adobe reader/Acrobat?
eboda_snaf Jan 17, 2012 3:05 AM (in response to Muppet Mark)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.
-
5. Re: JS: How to close Adobe reader/Acrobat?
Muppet Mark Jan 17, 2012 3:25 AM (in response to eboda_snaf)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?
-
6. Re: JS: How to close Adobe reader/Acrobat?
eboda_snaf Jan 17, 2012 3:31 AM (in response to Muppet Mark)Am on pc.
-
7. Re: JS: How to close Adobe reader/Acrobat?
Kasyan Servetsky Jan 18, 2012 11:46 AM (in response to eboda_snaf)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.
Kasyan
-
8. Re: JS: How to close Adobe reader/Acrobat?
eboda_snaf Jan 18, 2012 5:24 PM (in response to Kasyan Servetsky)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.
-
9. Re: JS: How to close Adobe reader/Acrobat?
Kasyan Servetsky Jan 19, 2012 12:16 AM (in response to eboda_snaf)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:
BridgeTalk.getSpecifier("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.
Kas
-
10. Re: JS: How to close Adobe reader/Acrobat?
eboda_snaf Jan 19, 2012 12:23 AM (in response to Kasyan Servetsky)it returns null..
-
11. Re: JS: How to close Adobe reader/Acrobat?
Kasyan Servetsky Jan 19, 2012 11:09 PM (in response to eboda_snaf)You are out of luck then. It won't work.
-
12. Re: JS: How to close Adobe reader/Acrobat?
eboda_snaf Jan 20, 2012 12:15 AM (in response to Kasyan Servetsky)Ya boy.. :.(