Nesting Script Snippets

Script snippets can be nested within text snippets using the nested snippet macro. Just above the snippet editor in the editing bar choose the keyboard button, then Insert Snippet.

Example: if the AppleScript snippet above had the abbreviation “eend”, and the date-adjusting JavaScript had the abbreviation “+4nwd”, you could use them both in a text snippet:

Dear Reader,

Thank you for your feedback on my book. I will analyze your question in depth and get back to you (+4nwd) on or before (Day: Monday), (Month: January) (Day: 1).

(eend),

– Author

which would expand to:

Dear Reader,

Thank you for your feedback on my book. I will analyze your question in depth and get back to you on or before Monday, March 23.

Have a good day,

– Author

The promised date is four non-weekend days in the future, and the signature is one of the random choices in greetingsList.

Feel free to share your cool scripts with us.

(See Date, Time, and Math Macros and Advanced Snippet Functions: Macros).