Running Script Debugger 6.0.4 (6A198) on macOS 10.11.6
###Need Detailed Instructions for Creating Templates with Placeholders
Mark (@alldritt) , I can see that you have provided us with a very powerful system to create templates. Many thanks for this.
I would like to take advantage of this but, sorry, I do not find the SD6 Help system to be very helpful in trying to learn how to create script templates using placeholders.
- I have become very frustrated after wasting about an hour with the Help system. (and now Iām spending more non-productive time writing this post). SD6 is supposed to be a great tool to make us more efficient, to do things quicker, but in this case I have to tell you that it fails in that respect.
. - I have searched the Help extensively, and read all of the sections on template, placeholders, and expressions, yet I still am unable to obtain a comprehensive understanding of how to do this.
. - There is much discussion in the Help system about using existing templates, clippings, etc, but very little about creating them.
. - The various terms are confusing and not clear when/where to use which:
- clippings
- clipping menu (where is it?)
- expressions
- placeholders
- tokens
I think an example script which shows how to use all of these in creating templates would be very helpful.
###Here is what I get when I search Help for ātemplateā
My first reaction is that I donāt want to āChooseā a template, I want to create one.
Finally, at the bottom of this page, it discusses briefly āUser Templatesā:
From the āExpressionsā page, I donāt see how this is used with templates, given the definition provided:
An expression is a snippet of AppleScript code that has a value. Expressions are evaluated every time the script pauses.
So, I backup in Help, and finally discover this one line buried at the bottom:
Iām looking for āplaceholdersā, not āclippingsā, but I follow this link anyway.
So then I see this Help page, which doesnāt seem to relate at all to templates:
So, initially I back up in Help and look elsewhere.
Finally, after much wasted time, I come back to here and discover this in the middle of the āClippingsā page:
It is still not clear if I can use this with templates, and if so, how I do it.
So, I make a guess and try using ā[[template:text]]ā
I find this works ONLY if put in quotes, like:
set myString to "[[template:text]]"
This will NOT compile:
set myString to [[template:text]]
For example, how do I create a placeholder that will be an AppleScript variable?
I tried these, but neither will compile:
set x to [[select:Your Variable]]
set x to [[template:Your Variable]]
What is the difference between using āselectā and using ātemplateā ?
How do I create placeholders in my template that will look like this when I create a new script using the template:
@alldritt, sorry for the rant, but I hope you find it helpful in understanding how (some) of your users find that the Help system is NOT very helpful, at least in some cases.
Perhaps you donāt intend for it to provide the type of detailed instructions Iām looking for. If so, then maybe it would be a good idea to put a link to external instructions/videos/examples in the Help system.
In the meantime, Iāll trying to ādrain the swampā, and need instructions on how to create placeholders in my custom script templates.
Thanks.