About | Contact
In this section we discuss the features of TaurusScript that make it stand out against the best of the other meters.
For something as simple as the SilkQuit meter the following tokens exist to allow you to pluralise English words associated with the quit information. For instance, changing hour to hours. The following table shows those tokens and their effect.
example: {+Y} year{#Yl} produces 1 year or 2 years
Bracing text is used to group text into cohesive units. Braced text is anything between {* or {^ or {< or {> and a closing }. For instance:
{*This text is braced}
{>Braced text can also {*be nested} inside braced text}
And the point of bracing? The point of bracing is to allow for Exclusion, Capitalisation, and Decision.
Take the TaurusScript for a year indication in SilkQuit:
{+Y} year{#Yl}
This always produces text. Even when {+Y} is zero we get 0 years. What we really want is for that text to be excluded from the tag-line whenever years is not significant. TaurusScript provides a mechanism whereby this can be achieved.
Firstly we make use of an alternate set of tokens. These are similar in content to the existing tokens. These token are {-Y}, {-M}, {-W}, {-D}, {-h}, {-m}, {-s}, {-U}, {-I}, {-O}, {-j}, {-k}. They perform the same function as their {+?} equivalents except that they have an effect on any braced text they might be a part of. The effect is to cause the braced text to be excluded; no longer appear in the hot-paste text.
As an example, take a look at the following script:
{*{-Y} year{#Yl}}
It will show 1 year, or 2 years etc. but will vanish when the year value is zero.
This should now lead you to understand this part of the default primary script:
{*{-Y} year{#Yl}, }{*{-M} month{#Ml}, }{*{-W} week{#Wl}, }{*{-D} day{#Dl}, }
In fact, most of the default script is made up of simple number word combinations but with braces to allow for exclusion.
The observant among might now ask, "Ah, but if I am changing the actual text in the result then how can I make sure my sentences begin with a capital letter?" There is a special form of brace for this, called the Capitalisation Brace: {^
The first character inside of a {^ and } brace will be capitalised, as this example shows:
{^{*{-Y} year{#Yl}, }{*{-M} month{#Ml}, }{*{-W} week{#Wl}, }{*{-D} day{#Dl}, }}
Assuming that you are generating numbers as words then this script will produce a sentence with an initial capital letter.
Script between {> and } will only be shown when the quit is in progress. (Post-Quit)
Script between {< and } will only be shown before the quit begins. (Pre-Quit)
As you have no doubt seen elsewhere, TaurusScript can display numbers as either words or digits. The default is digits and can be modified using the following two tokens.
Any tokens following {A} will be shown in words (i.e. 23 becomes twenty three)
Any tokens following {1} will be shown in digits (i.e. 23)
That conclused the Advanced TaurusScript guide. If you have any problems then please Contact Us.