Matching Pairs of Instructions in a Computation Script
Problem
I have a complicated script that incorporates several IF and REPEAT instructions. I need to be able to see these pairings better. I know there are several tools for doing this when editing instructions in the text of the template, but I'm unsure of what's available to me when I'm in a computation script.
Solution
There are a few things you can do to match pairs of instructions while working in a computation script:
- Click the
Auto Format button in the script editor toolbar. This indents scripting between instructions. Nested instructions are likewise indented, like in the following example:
- Place your cursor in the opening or closing instruction and press Ctrl+M. HotDocs moves your cursor to the matching instruction. (You can also choose Match IF/REPEAT from the shortcut menu.)
- Place your cursor in the opening or closing instruction and press Ctrl+Shift+M. HotDocs highlights the entire section of the instruction with which you are working. (You can also choose Select IF/REPEAT from the shortcut menu.)
For details, see Use the Script Editor.
For details on working with instructions in a text template, see Match Opening Instructions with Closing Instructions.