At a Glance: The Dialog Editor (Script Tab)
A
B
C
D
E
F
You can open the Script tab of the Dialog Editor from the Component Manager or while editing a template by creating a new dialog or opening an existing dialog then clicking on the Script tab.
At the top of this tab is the Script Toolbar A where you can choose from the following buttons to search and edit the Script field B:
Auto Format: Indents matching pairs of IF and REPEAT instructions, based on the level of their insertion.
Undo: Removes any changes you have made to the script.
Redo: Reapplies any changes you have made to the script.
Cut: Removes the selected text and copies it to the Clipboard.
Copy: Copies the selected text to the Clipboard.
Paste: Pastes the selected text on the Clipboard at the cursor position in the script.
Find: Displays the Find dialog box where you can specify the word or text string for which you are searching.
Find Next: Finds the next instance of the word or text string for which you are searching.
Find and Replace: Searches for a specific word or text string and replaces it with word or text string you specify.
Go To: Displays the Go To dialog box where you can specify the location in the script to which you want to move your cursor. You can go to either a specific line or character in the script.
Indent Block: Indents the selected text.
Outdent Block: Realigns the indented text with the left margin of the scripting box. (If the text has been indented more than once, realigns the text with the previous tab stop.)
Comment Block: Causes the selected text to become inactive, meaning HotDocs won't process it when it processes the computation. Often, template developers "comment out" scripting if they need to close the scripting dialog box but HotDocs won't let them because the script is invalid. Additionally, developers often add personal explanations to the scripts they are writing, and commenting them out keeps the computation operational.
Uncomment Block: Removes any commenting that has been applied to the selected script. Once the script is uncommented, HotDocs will attempt to process it.
Options: Displays the HotDocs Options dialog box where you can customize the way script editing features work.
Help: Opens the relevant page of the HotDocs Help File.
You have the option of writing directly in the Script field B, using your mouse to drag variables, operators, and models from the lists below to this box, or you can press Ctrl+Space to have HotDocs display these lists directly in the script so you can use the keyboard to choose the syntax item you need.
On the left is the Component menu C showing a list of all the components in this template. You can search it using the find field at the bottom, filter it by selecting a component type from the drop-down list at the top or create a new component by clicking on the New Component button. In the centre D is a list of useful scripting operators, at the top right is a list of Instruction models E, and at the bottom right is a list of Expression models F.
To access help for each instruction or expression, first select the model in one of the lists and then press Ctrl+F1.
For further information on how to use the operators, see Use Operators when Scripting, and for further information what the Instruction and expression models do, see Full List of Instruction Models and Full List of Expression Models.
To learn more about using the Dialog Editor follow the links below:
- Use Scripts to Add Power to Your Dialogs
- Special Instructions for Dialog Scripts
- At a Glance: The Dialog Editor (Properties Tab)
- At a Glance: The Dialog Editor (Options tab)
- At a Glance: The Locals tab (Variable/Dialog Editor)
- At a Glance: The Resource tab (Variable/Dialog Editor)
- At a Glance: The Dialog Editor (Layout tab)
- At a Glance: The Used In tab (Variable/Dialog Editor)
- At a Glance: The Notes tab (Variable/Dialog Editor)