The Template Results panel displays variables that were generated by running a Binary Template on a file (see Introduction to Templates and Scripts) and this panel is shown by default attached to the bottom of the Hex Editor Window (see Using the Hex Editor). To hide the Template Results panel click on the 'x' icon to the right of the Template Results title or click the 'View > Template Results' menu option when a file is opened. If the Template Results panel is hidden, it can be shown by clicking the 'View > Template Results' menu option or by clicking the button underneath the vertical scroll bar and dragging upwards (see the diagram at the bottom of this page). The Template Results can be attached to the right side of the Hex Editor Window by right-clicking on the Template Results and choosing the Template Results Position menu option. Alternately, the Template variables can be viewed by clicking on the Variables tab of the Inspector. To see an example of a Template open any ZIP, BMP, or WAV file on your computer and a Binary Template will automatically be run and the results displayed.
All variables are displayed in a hierarchal list. If a variable in the list has a right arrow or '+' beside it that variable is either a structure or array. Clicking the arrow or plus or double-clicking the variable will show all members within that variable. If a variable has a down arrow or '-' beside it click the icon or double-click the variable to hide all members.
A variable can also be opened using the Ctrl+Right Arrow key combination or the Right Arrow
key while the cursor is in the right-most column. A variable can be closed using the Ctrl+Left Arrow key combination or
by pressing the Left Arrow when the cursor is in the left-most column.
When a variable is selected, the bytes that correspond to that variable are selected in the file.
To open the entire sub-tree below a variable, right-click on a variable with the mouse and select the Expand All Children of Node menu option, or right-click on a variable and select Expand All Nodes to open all children of all nodes in the tree (note that the syntax '<open=suppress>' can be used after a variable to prevent it from being opened in an Expand All operation). To locate a variable in the list that corresponds to a byte position in the file, position the cursor over a byte in the Hex Editor Window and then use the 'Search > Jump to Template Variable' menu option to try to locate the variable (see Search Menu). Variables can also be located by string value using the Find Bar.
The Template Results panel displays 6 different columns: The Name column lists the data type and the name of the variable, and will also include any array indices. The Value column displays the value of the current variable as read from the file. The Start column lists the starting address of the variable and the Size column lists the size in bytes of the data. The Color column lists the foreground color (Fg:) and background color (Bg:) of the variable (this can be modified by the SetForeColor, SetBackColor, or SetColor functions as listed in Interface Functions).
The Comment column displays a string that can be set after a variable is declared using the syntax '<comment="<string>">' or '<comment=<function_name>>' (see Declaring Template Variables).
If the value for a variable displayed in the Value column is a hex or decimal number, right-click on the variable and select 'Goto > Goto Address <number>' or 'Goto > Goto Sector <number>' from the popup menu to jump to that byte address or sector within the file. For example, if a variable has the value '10324', right-click on the variable and choose 'Goto > Goto Address 10324' to jump to address 10324.
The display format for the different columns can be changed by right-clicking on the window and selecting the 'Column Display Format' option from the menu. For the Value column, if the 'Default' option is chosen from the 'Column Display Format' menu, then the display format is determined when running the Template from the functions DisplayFormatHex, DisplayFormatDecimal, DisplayFormatOctal, DisplayFormatBinary, or by using '<format=hex|decimal|octal|binary>'. The 'Column Display Format' for the first column can be set to 'Type and Name' to show both the variable type and name, or set to 'Name' to just display the variable name. Through the right-click menu the address display for the Start column can be set to either 'Global' or 'Local' using the 'Start Addresses' menu option. In 'Global' mode, the addresses are displayed as regular addresses from the beginning of the file but the 'Local' addresses option displays a variable's address as the offset from its parent variable.
To edit the value of a variable, click the value or press the Enter key
while a cell in the Value column is selected (the current cell is indicated by a dashed box and can be moved using the cursor keys).
Modify the value and press Enter to commit the change or Esc to cancel. Editing is performed similar to the Inspector and note that date formats can be controlled using the Inspector Options dialog. If no value is displayed in the Value column, this means that the variable cannot be edited. To clear the template results, right-click the Template Results panel or the Variables tab of the Inspector and click the 'Clear' menu option.
By default, the Template Results does not display any local variables (see Declaring Template Variables for more information on local variables). To enable the display of local variables right-click on the panel and select the Show Local Variables menu option from the menu. Many of the menu options on the right-click menu are similar to the Inspector. See the Inspector help topic for information on the 'Copy', 'Copy Row', 'Copy Column', 'Copy Table', and 'Export CSV' options. Use the 'Export XML' menu option to export data from the Template Results in XML format (note that XML files are written in UTF-8 format).
Mouse Over and Hints
After a Template has been run on a file, 010 Editor has an easy way to view the Template variables. Just position the mouse over bytes in the Hex Editor Window for a second and a Hint will popup displaying the value of the variable that uses those bytes. Brackets are also displayed on the Hex Editor Window to indicate which bytes the variable uses. The brackets and hint display can be turned off through the Hex Editor Options dialog.