Using The Built-In Acrobat Javascript Editor; Using An External Editor; Additional Editor Capabilities - Adobe 12001196 - Acrobat - Mac Manual

Javascript
Hide thumbs Also See for 12001196 - Acrobat - Mac:
Table of Contents

Advertisement

Acrobat JavaScript Editor and Debugger Console
2

Using the Built-in Acrobat JavaScript Editor

4. Click OK to close the Preferences dialog box.
Using the Built-in Acrobat JavaScript Editor
You can use the built-in Acrobat JavaScript editor to evaluate JavaScript code, just as you
use the Acrobat JavaScript console. Simply select a line or block of code to evaluate, and
press the Enter key on the numeric keypad or Ctrl+Return on the regular keyboard.
The editor behaves the same way as the debugger console except that the results of
evaluating code in the console are output to the console window, rather than to the editor.
This is so that code that you enter in the editor does not become mixed up with printed
evaluation results.
You format code in the built-in JavaScript editor in the same way that you do in the console
window. For details, see

Using an External Editor

When you specify an external editor program as the default for editing JavaScripts in
Acrobat, that program is used any time a JavaScript has to be edited from inside Acrobat.
Acrobat generates a temporary file and opens it in the external editor program. When you
are editing a file in an external editor, you must save the file for Acrobat to see your
changes. In addition, Acrobat is inaccessible to you while you are editing the file in the
external editor program. You cannot evaluate Acrobat JavaScript code from inside an
external editor. Close the external JavaScript editor to regain access to Acrobat.

Additional Editor Capabilities

Acrobat is able to support additional editor capabilities of Windows-based editors if those
capabilities can be specified on the command line. Two parameters are available to support
command line syntax: the file name (%f) and the target line number (%n). Parameters for
Macintosh-based editors are not supported.
One important editor capability is the launching of a new instance of the editor each time
you start a new editing session. By default, many editors load new files into the same editor
instance if one is already running. In such a case, opening a new session closes the existing
one. Since Acrobat does not have access to your changes in the file until you have saved it
in the temporary locaton, the result is that unsaved changes in your session are lost. To
prevent this from occurring, you must either remember to close the editor application
before starting a new editing session or you must instruct the editor to always launch a new
editor instance.
If you can set an internal preference in your editor to always launch a new instance of the
editor, do so. If you editor requires a command line parameter to instruct it to invoke a new
editor instance, you may add that parameter to the editor command line specified in the
24
"Formatting Code" on page
20.
Acrobat JavaScript Scripting Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Acrobat 6.0

Table of Contents