8 Replies Latest reply on Aug 5, 2013 1:57 PM by Sturm359

    JavaScript doesn't work in Acrobat?

    Sturm359 Level 1

      I've been doing a lot of scripting in InDesign over the past few months, as well as a little Illustrator, and I've learned a heck of a lot about JavaScript and ExtendScript.  I even have a very solid hold on ScriptUI!  So I now have a working, 1700-line script that fulfills a purpose in our company.  Now I need to write a new InDesign script to fulfill a different purpose.  This new script will eventually call Acrobat (presumably with BridgeTalk) and perform a couple of functions before the script ends.


      The tasks I need Acrobat to perform are conceivably very simple (Open a file, replace a page, and save/close the file).  This should be extraordinarily easy to do once I've learned Acrobat's JavaScript vocabulary.  To this end, I've been reading up on how to script Acrobat.  Unfortunately, it does not seem anywhere as simple as scripting InDesign nor Illustrator.


      For one thing, the ExtendScript Toolkit is now useless since Acrobat has a built-in "Javascript Console".  This would be perfectly fine, except that my console seems to be completely broken.  I have both Acrobat IX and Acrobat X on this Mac and both exhibit the same behavior.  Once I've launched it (and it was hard enough just trying to figure out how to enable and launch the console in Acrobat X!), I type in a simple "3 + 4" in the console and press Command+Enter (since I don't have a fancy Mac extended keyboard with a numeric keypad), as noted in Thom Parker's guide on AcrobatUsers.


      Nothing happens.


      I've tried other things, such as selecting the line of code first, pressing Control+Enter instead, using a different line of code such as "console.println("Hello.");", etc.  Nothing I do seems to work.  What am I doing wrong?