SilkQuit

be good to yourself...

Introduction to TaurusScript

The tag lines that you can paste into a document with SilkQuit are written in TaurusScript. TaurusScript is a method of describing how you want the text to look, where you want the numbers to be inserted into the text, and whether the value of the number should affect the text to be displayed. Its purpose is to allow for the automatic generation of sentences with correct punctuation. SilkQuit was the first, and remains the only, quit meter that is capable of producing near seamless sentence construction.

When you install SilkQuit a default script is created for you and assigned to your primary hot-paste text. The default script has been written to only include significant values; if any value is zero (such as years, months, weeks) the corresponding text is omitted. The default script also contains an assignment for what to insert if the quit date is in the future. As illustrated below.

{^{*{<{A}{*{-Y} year{#Yl}, }{*{-M} month{#Ml}, }{*{-W} week{#Wl}, }{*{-D} day{#Dl}, }{1}{*{-h} hour{#hl}, }{+m} minute{#ml} and {+s} second{#sl}.} {1}{^{+C}} cigarette{#Cl} not smoked, saving {+$}. Life saved: {1}{*{-U} year{#Ul}, }{*{-I} week{#Il}, }{*{-O} day{#Ol}, }{*{-j} hour{#jl}, }{+k} minute{#kl}.}}{*{>I will quit smoking in {^{A}{*{-Y} year{#Yl}, }{*{-M} month{#Ml}, }{*{-W} week{#Wl}, }{*{-D} day{#Dl}, }{1}{*{-h} hour{#hl}, }{+m} minute{#ml} and {+s} second{#sl}.}}}

Example Output When Quit Is In Progress

Three weeks, one day, 11 hours, 11 minutes and 44 seconds. 673 cigarettes not smoked, saving £121.32. Life saved: 2 days, 8 hours, 5 minutes.

Example Output Before Quit Begins

I will quit smoking in 2 months, 1 week, 12 hours, 43 minutes and 44 seconds.

Your primary hot-paste text is pre-prepared for you. The four secondary hot-paste texts are available for you to use. You may modify the primary hot-paste text if you like but there is no requirement for you to do so.

Beginning To Understand TaurusScript

Just like your quit, you will have better success with TaurusScript if you take baby steps in its understanding. First up, you need to know the difference between text and token.

  • Text is anything that is not interpretted as part of a token.
  • Token is any recognised symbol inside of curly braces.

To begin this introduction, we will create a simple tagline to show years, months, weeks, days, hours, minutes, and seconds in the form 0Y 0M 0W 0D 0h 0m 0s like some other meters do, just so we can see the simpler parts of TaurusScript in action.

To do this you need to know about some of the script's tokens. The following list shows the basic tokens and what they do in the script.

{+Y}Inserts number of years quit
{+M}Inserts number of months quit
{+W}Inserts number of weeks quit
{+D}Inserts number of days quit
{+h}Inserts number of hours quit
{+m}Inserts number of minutes quit
{+s}Inserts number of seconds quit

By inserting these token into the text 0Y 0M 0W 0D 0h 0m 0s where each token replaces the corresponding number, the script becomes:

{+Y}Y {+M}M {+W}W {+D}D {+h}h {+m}m {+s}s

And produces output like this:

0Y 0M 3W 1D 11h 59m 47s

We will come back to this example later when we discuss bracing text.

Adding Cigarettes Not Smoked, Money Saved, and Life Saved

You can of course add more details to the tag-line. Here is a list of additional tokens you can use.

{+C}Inserts number of cigarettes not smoked
{+P}Inserts number of packs/cartons not smoked
{+$}Inserts amount of money saved, in local currency
{+U}Inserts number of years life saved
{+I}Inserts number of weeks life saved
{+O}Inserts number of days life saved
{+j}Inserts number of hours life saved
{+k}Inserts number of minutes life saved
{+N}Inserts the name of the user

So, for instance, the following uses all of the tokens introduced so far:

Meter for {+N}
{+Y}Y {+M}M {+W}W {+D}D {+h}h {+m}m {+s}s
Life saved: {+U}Y {+I}W {+O}D {+j}h {+k}m

and generates:

Meter for Anne Ex Smoker
0Y 0M 3W 1D 12h 17m 10s
675 cigarettes not smoked, saving £121.56
Life saved: 0Y 0W 2D 8h 15m

That concludes the introduction. You now know everything you need to produce simple TaurusScripts. Click on the "Next" button to read about advanced features of TaurusScript.

Next >>