It is possible to add your own custom actions using IronPython or JavaScript scripts. The resulting action control for an IronPython script is launched from a text area. See Using Scripts in the Text Area and IronPython Example Scripts for more information.
To reach the New Script dialog:
Click on the Toggle Edit Mode button, , in the Text Area title bar.
Comment: You can also right-click in the text area and select Edit from the pop-up menu.
In the Text Area toolbar, click on the Insert Action Control button, .
Click on Script in the left-hand panel.
Click New....
Option |
Description |
Script
name |
The name of the script as you want it to be displayed in the Available scripts list of the Action Control dialog. |
Description |
An optional description of what the script does. |
Script |
The field for typing the script in IronPython. The font settings for the script field can be changed using Tools > Options, Fonts page and selecting Expression and script editor. See Expression and Script Editor Keyboard Shortcuts for information about available shortcuts. |
Script
parameters |
Lists any defined parameters to be used by the script. |
Add... |
Opens the Add Script Parameter dialog where you can define new parameters to use with the script. |
Edit... |
Opens the Edit Script Parameter dialog where you can edit the selected parameter. |
Remove |
Removes the selected parameter. |
Run
Script |
Allows you to test the script by running it in the document, without your having to close this dialog. Any objects marked by print in the script definition will be shown in the Output list below. |
Undo |
Undoes the Run Script operation so that any results are removed from the document. |
Output |
Lists all objects marked up with "print" in the script definition. For example, if you have a script parameter called "title", you can display its debug value by typing "print title" in the Script field. |
Save
As |
[Only applicable for the Edit Script dialog.] Allows you to save an edited script under a different name, so that the original script can be kept alongside the edited one. |
See also: