Adobe 12001196 Scripting Guide - Page 27
Exercise: Working with the JavaScript Console, Enabling JavaScript
UPC - 718659085742
View all Adobe 12001196 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 27 highlights
Acrobat JavaScript Editor and Debugger Console 2 Exercise: Working with the JavaScript Console Saving and Closing a File with a Syntax Error If you save and close a file you have been editing and it contains a syntax error (on line 123, for example), Acrobat displays a dialog box with the following message prompting whether you want to fix the error: There is a JavaScript error at line 123. Do you want to fix the error? NOTE: If you click No, Acrobat discards your file. Always click Yes. Acrobat will expand the path to the editor to include the line number in the specified syntax. The editor will open and the cursor will be placed on line 123. Exercise: Working with the JavaScript Console To do this exercise, you must have Acrobat 6 Pro installed on your machine. In this exercise you will verify that JavaScript is enabled for Acrobat and then begin working with the Acrobat JavaScript console to edit and evaluate code. At the end of the exercise you will be able to: ● Enable or disable Acrobat JavaScript. ● Enable or disable the JavaScript debugger. ● Open the console in the debugger. ● Evaluate code in the console window. Enabling JavaScript To create and use JavaScript actions in Acrobat, you must have JavaScript enabled. To verify that JavaScript is enabled for your installation of Acrobat: 1. Launch the Acrobat application. 2. Select Edit > Preferences to open the Preferences dialog box. 3. Select JavaScript from the list of options on the left side of the dialog box. 4. Select Enable Acrobat JavaScript if it is not already selected. 5. Keep the Preferences dialog box open to enable the JavaScript debugger and the debugger console. Acrobat JavaScript Scripting Guide 27