Template Groups
Difficulty: Novice
Script Debugger’s Save as Template command creates an individual template document that appears in the User Templates section of Script Debugger’s Template Chooser panel.
You may have noticed that Script Debugger’s built in templates are grouped:
You can have Script Debugger present your user templates in this way if you like. This document explains how to accomplish this.
Creating Grouped Templates
Template Groups are directories containing a series of Script Debugger document templates (directories with a .sdtemplate
extension). For example, if you configured the ~/Library/Application Support/Script Debugger 6/Templates/
folder like this:
The two document templates contained within the Group Test
folder are presented as a group within Script Debugger’s Template Chooser:
NOTES
- Only one level of grouping is supported.
- Script Debugger will remember your last-selected template within each group.
- The Template Chooser panel must be closed and re-opened to reflect changes to the structure of the
~/Library/Application Support/Script Debugger 6/Templates/
folder.
Changing Template Icons
By default, the document icons Script Debugger assigns when saving your document template are presented in the Template Chooser. You can alter the icons presented for each template in your group by adding a TemplateIcon.icns
file to an individual template directory (.sdtemplate
extension). If present, this icon will appear in Script Debugger’s Template Chooser.
Its a little difficult to create .icns
files these days. You can use Apple’s Preview and some other image editing programs to create them. We will move to support more modern image formats in the future.