Adobe 12001196 Scripting Guide - Page 40

Debugger Scripts Window, Accessing Scripts in the Scripts Window, Scripts Inside PDF Files

Page 40 highlights

3 Acrobat JavaScript Debugger Debugger Scripts Window Debugger Scripts Window Scripts are automatically collected from a PDF file open in Acrobat when you open the debugger dialog. The debugger displays these in the Scripts window. Figure 3.5 shows an example. FIGURE 3.5 Scripts window Accessing Scripts in the Scripts Window To access scripts you want to display, you click the triangle next to an entry in the Scripts window to open the next level down. Continue to click triangles to open the next lower level. Use the scroll bar, if necessary, to view the contents in the window as you open lower levels. A script icon indicates that a script is defined for an action or function. In Figure 3.5, a function is defined for a mouse-up action on a button-type form named Button1. Clicking on the script icon opens the debugger at the location of the first script statement. Acrobat JavaScripts can be stored in several places, either inside or outside PDF files. Scripts that live inside a PDF file are associated with an action of type JavaScript. The following sections contain lists of possible locations for scripts, inside or outside a PDF file. These scripts are immediately available for viewing and debugging in with the Acrobat JavaScript Debugger Scripts Inside PDF Files Table 3.3 lists the PDF-file script types that can be displayed in the Scripts window. You can view and debug these scripts anytime that you open the debugger dialog. You can edit these scripts from inside the debugger and you can set breakpoints as described in Breakpoints on page 44. Changes to scripts do not take effect until the scripts are re-run; you cannot make changes to a running script. TABLE 3.3 Scripts inside PDF files Location Document level Access Advanced > JavaScript > Document JavaScripts 40 Acrobat JavaScript Scripting Guide

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90

Acrobat JavaScript Debugger
Debugger Scripts Window
3
40
Acrobat JavaScript Scripting Guide
Debugger Scripts Window
Scripts are automatically collected from a PDF file open in Acrobat when you open the
debugger dialog. The debugger displays these in the
Scripts
window.
Figure 3.5
shows an
example.
F
IGURE
3.5
Scripts window
Accessing Scripts in the Scripts Window
To access scripts you want to display, you click the triangle next to an entry in the
Scripts
window to open the next level down. Continue to click triangles to open the next lower
level. Use the scroll bar, if necessary, to view the contents in the window as you open lower
levels. A script icon indicates that a script is defined for an action or function. In
Figure 3.5
, a
function is defined for a mouse-up action on a button-type form named
Button1
. Clicking
on the script icon opens the debugger at the location of the first script statement.
Acrobat JavaScripts can be stored in several places, either inside or outside PDF files. Scripts
that live inside a PDF file are associated with an action of type JavaScript. The following
sections contain lists of possible locations for scripts, inside or outside a PDF file. These
scripts are immediately available for viewing and debugging in with the Acrobat JavaScript
Debugger
Scripts Inside PDF Files
Table 3.3
lists the PDF-file script types that can be displayed in the Scripts window. You can
view and debug these scripts anytime that you open the debugger dialog. You can edit
these scripts from inside the debugger and you can set breakpoints as described in
Breakpoints on page 44
. Changes to scripts do not take effect until the scripts are re-run;
you cannot make changes to a running script.
T
ABLE
3.3
Scripts inside PDF files
Location
Access
Document level
Advanced > JavaScript > Document JavaScripts