<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Script Example Digital Counter</title><link>https://sourceforge.net/p/snowmix/wiki/Script%2520Example%2520Digital%2520Counter/</link><description>Recent changes to Script Example Digital Counter</description><atom:link href="https://sourceforge.net/p/snowmix/wiki/Script%20Example%20Digital%20Counter/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 29 Mar 2016 22:30:36 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/snowmix/wiki/Script%20Example%20Digital%20Counter/feed" rel="self" type="application/rss+xml"/><item><title>Script Example Digital Counter modified by Peter Maersk-Moller</title><link>https://sourceforge.net/p/snowmix/wiki/Script%2520Example%2520Digital%2520Counter/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v9
+++ v10
@@ -1,5 +1,6 @@
 Script Example Digital Clock Counter
 =====
+Updated for Snowmix 0.5.0 and 0.5.1

 This page explains and demonstrates how to use basic Snowmix Scripting to create a digital clock counter. The digital clock counter will display hours, minutes and seconds. We could use text strings, but will in this case load graphic images with the numbers 0 through 9 and a colon as separator between hours, minutes and seconds.

@@ -9,6 +10,7 @@

 Initially we need to a minimum setup for Snowmix to run as shown below:

+        require version 0.5.0
         system control port 9999
         system geometry 768 576 BGRA
         system frame rate 25
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Maersk-Moller</dc:creator><pubDate>Tue, 29 Mar 2016 22:30:36 -0000</pubDate><guid>https://sourceforge.net4621eac942bd791089fcffdef9501d5dab2bff7c</guid></item><item><title>Script Example Digital Counter modified by Peter Maersk-Moller</title><link>https://sourceforge.net/p/snowmix/wiki/Script%2520Example%2520Digital%2520Counter/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Maersk-Moller</dc:creator><pubDate>Tue, 29 Mar 2016 22:22:14 -0000</pubDate><guid>https://sourceforge.net1d7b07cd9865382294279447e0bb9ac549fb1c13</guid></item><item><title>Script Example Digital Counter modified by Peter Maersk-Moller</title><link>https://sourceforge.net/p/snowmix/wiki/Script%2520Example%2520Digital%2520Counter/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -39,14 +39,14 @@
         image place 6 20 347 226 center middle
         image place 7 10 330 226 center middle
         image place 8 10 305 226 center middle
-        image place scale 1 0.25 0.25
-        image place scale 2 0.25 0.25
-        image place scale 3 0.25 0.25
-        image place scale 4 0.25 0.25
-        image place scale 5 0.25 0.25
-        image place scale 6 0.25 0.25
-        image place scale 7 0.25 0.25
-        image place scale 8 0.25 0.25
+        image scale 1 0.25 0.25
+        image scale 2 0.25 0.25
+        image scale 3 0.25 0.25
+        image scale 4 0.25 0.25
+        image scale 5 0.25 0.25
+        image scale 6 0.25 0.25
+        image scale 7 0.25 0.25
+        image scale 8 0.25 0.25

 Now we need ensure that the images are overlayed during each frame mix.

@@ -86,40 +86,40 @@
 Here we know the command macro set with the command *overlay pre* is called at frame rate whether or not a *shmsrc* is connected to Snowmix. We also know that we have set the framerate to be 25. The result is that the command macro *SecondUpdate* is called every second. This can then be used to create a counter as part of the state-machine. First we create the second counter that will count from 00 to 59 and then call the minute counter and reset back to 00.

         command create SecondUpdate
-          image place image 1 11
-          next
-          image place image 1 12
-          next
-          image place image 1 13
-          next
-          image place image 1 14
-          next
-          image place image 1 15
-          next
-          image place image 1 16
-          next
-          image place image 1 17
-          next
-          image place image 1 18
-          next
-          image place image 1 19
-          next
-          image place image 1 10
+          image image 1 11
+          next
+          image image 1 12
+          next
+          image image 1 13
+          next
+          image image 1 14
+          next
+          image image 1 15
+          next
+          image image 1 16
+          next
+          image image 1 17
+          next
+          image image 1 18
+          next
+          image image 1 19
+          next
+          image image 1 10
           Second10Update
           loop
         command end
         command create Second10Update
-          image place image 2 11
-          next
-          image place image 2 12
-          next
-          image place image 2 13
-          next
-          image place image 2 14
-          next
-          image place image 2 15
-          next
-          image place image 2 10
+          image image 2 11
+          next
+          image image 2 12
+          next
+          image image 2 13
+          next
+          image image 2 14
+          next
+          image image 2 15
+          next
+          image image 2 10
           MinuteUpdate
           loop
     command end    
@@ -127,40 +127,40 @@
 The minute counter is nearly identical to the second counter.

         command create MinuteUpdate
-          image place image 4 11
-          next
-          image place image 4 12
-          next
-          image place image 4 13
-          next
-          image place image 4 14
-          next
-          image place image 4 15
-          next
-          image place image 4 16
-          next
-          image place image 4 17
-          next
-          image place image 4 18
-          next
-          image place image 4 19
-          next
-          image place image 4 10
+          image image 4 11
+          next
+          image image 4 12
+          next
+          image image 4 13
+          next
+          image image 4 14
+          next
+          image image 4 15
+          next
+          image image 4 16
+          next
+          image image 4 17
+          next
+          image image 4 18
+          next
+          image image 4 19
+          next
+          image image 4 10
           Minute10Update
           loop
         command end
         command create Minute10Update
-          image place image 5 11
-          next
-          image place image 5 12
-          next
-          image place image 5 13
-          next
-          image place image 5 14
-          next
-          image place image 5 15
-          next
-          image place image 5 10
+          image image 5 11
+          next
+          image image 5 12
+          next
+          image image 5 13
+          next
+          image image 5 14
+          next
+          image image 5 15
+          next
+          image image 5 10
           Hour24Update
           loop
     command end    
@@ -175,33 +175,33 @@
           loop
         command end
         command create HourUpdate
-          image place image 7 11
-          next
-          image place image 7 12
-          next
-          image place image 7 13
-          next
-          image place image 7 14
-          next
-          image place image 7 15
-          next
-          image place image 7 16
-          next
-          image place image 7 17
-          next
-          image place image 7 18
-          next
-          image place image 7 19
-          next
-          image place image 7 10
+          image image 7 11
+          next
+          image image 7 12
+          next
+          image image 7 13
+          next
+          image image 7 14
+          next
+          image image 7 15
+          next
+          image image 7 16
+          next
+          image image 7 17
+          next
+          image image 7 18
+          next
+          image image 7 19
+          next
+          image image 7 10
           Hour10Update
           loop
         command end

         command create Hour10Update
-          image place image 8 11
-          next
-          image place image 8 12
+          image image 8 11
+          next
+          image image 8 12
           loop
         command end

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Maersk-Moller</dc:creator><pubDate>Tue, 29 Mar 2016 22:17:41 -0000</pubDate><guid>https://sourceforge.net3eed0d44c4ae072f8084bf30e4f5718d93a1c8c7</guid></item><item><title>Script Example Digital Counter modified by Peter Maersk-Moller</title><link>https://sourceforge.net/p/snowmix/wiki/Script%2520Example%2520Digital%2520Counter/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -48,7 +48,7 @@
         image place scale 7 0.25 0.25
         image place scale 8 0.25 0.25

-Now we need ensure that the images a overlayed during each frame mix.
+Now we need ensure that the images are overlayed during each frame mix.

         # By default the stack will have the system feed 0 as the bottom background
         # stack 0
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Maersk-Moller</dc:creator><pubDate>Fri, 09 Jan 2015 14:17:26 -0000</pubDate><guid>https://sourceforge.netb9cf749d2a5e3d27d68543852e3ea998c93701a8</guid></item><item><title>Script Example Digital Counter modified by Peter Maersk-Moller</title><link>https://sourceforge.net/p/snowmix/wiki/Script%2520Example%2520Digital%2520Counter/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -1,18 +1,20 @@
 Script Example Digital Clock Counter
 =====

-This page explains and demonstrates how to use basic Snowmix Scripting to create a digital clock counter. The digital clock counter will display hours, minutes and seconds. We could use text strings, but will in this case load a graphic image of the numbers 0 through 9 and a colon as separator between hours, minutes and seconds.
+This page explains and demonstrates how to use basic Snowmix Scripting to create a digital clock counter. The digital clock counter will display hours, minutes and seconds. We could use text strings, but will in this case load graphic images with the numbers 0 through 9 and a colon as separator between hours, minutes and seconds.

 [[img src=digi.png alt=clock]]

-Initial we need to a minimum setup for Snowmix as shown below:
+The image above shows the clock.
+
+Initially we need to a minimum setup for Snowmix to run as shown below:

         system control port 9999
         system geometry 768 576 BGRA
         system frame rate 25
         system socket /tmp/mixer1

-We need no video feeds and we will use the sytem feed 0 as background. By default the system feed is black. Now we need to load the images to use as numbers for the clock.
+To show and test the clock we need no video feeds and we can use the sytem feed 0 as background. By default the system feed is black. Now we need to load the images to use as numbers for the clock.

         image load 10 ../images/digital-0-105x151.png
         image load 11 ../images/digital-1-105x151.png
@@ -163,7 +165,7 @@
           loop
     command end    

-Now the hour counter is a bit special as we need to count from 00 to 23 and then reset to 00. We can do that by using a counter that counts to 24 as well as updating the hour counter part.
+Now the hour counter is a bit special as we need to count from 00 to 23 and then reset to 00.

         command create Hour24Update
           HourUpdate
@@ -203,7 +205,7 @@
           loop
         command end

-Now saving all the above commands into an ini file, you can now test the clock as described earlier. The clock will count from 00:00:00 with 1 second interval.
+Now saving all the above commands into an ini file, we can now test the clock as described earlier. The clock will count from 00:00:00 with a 1 second interval.

 If we want to set the clock to 09:23:17, we can execute the following commands

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Maersk-Moller</dc:creator><pubDate>Thu, 13 Nov 2014 11:45:17 -0000</pubDate><guid>https://sourceforge.netc9a6d153827a177f41cfa6ac514cea21bc4905e2</guid></item><item><title>Script Example Digital Counter modified by Peter Maersk-Moller</title><link>https://sourceforge.net/p/snowmix/wiki/Script%2520Example%2520Digital%2520Counter/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -2,6 +2,8 @@
 =====

 This page explains and demonstrates how to use basic Snowmix Scripting to create a digital clock counter. The digital clock counter will display hours, minutes and seconds. We could use text strings, but will in this case load a graphic image of the numbers 0 through 9 and a colon as separator between hours, minutes and seconds.
+
+[[img src=digi.png alt=clock]]

 Initial we need to a minimum setup for Snowmix as shown below:

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Maersk-Moller</dc:creator><pubDate>Thu, 13 Nov 2014 00:34:54 -0000</pubDate><guid>https://sourceforge.net335a74256c29ac04f30899a2a8f612602a00c7b9</guid></item><item><title>Script Example Digital Counter modified by Peter Maersk-Moller</title><link>https://sourceforge.net/p/snowmix/wiki/Script%2520Example%2520Digital%2520Counter/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -53,7 +53,7 @@
           image overlay 1..8
           loop
         command end
-        overlay finish
+        overlay finish Show

 With the configuration so far, we can now test it and should see hours, minutes and seconds separated by colons displayed as 00:00:00. The above commands is first saved into the file ini/ExampleDigitalCounter.ini.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Maersk-Moller</dc:creator><pubDate>Wed, 12 Nov 2014 23:52:10 -0000</pubDate><guid>https://sourceforge.net77720f43fd745d739df82842c3efaee555e960eb</guid></item><item><title>Script Example Digital Counter modified by Peter Maersk-Moller</title><link>https://sourceforge.net/p/snowmix/wiki/Script%2520Example%2520Digital%2520Counter/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -226,4 +226,4 @@

 Setting the clock manually is as shown a bit difficult although using an external script makes is easier. Another way would be to use the [embedded Tcl interpreter](Tcl Interpreter) and [advanced scripting](Advanced scripting).

-The ini file for this example is available as an attachment to this page.
+The ini file for this example is available as an attachment to this page found at the top of the page. Download the file and use it as ini file for Snowmix to test the example.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Maersk-Moller</dc:creator><pubDate>Tue, 11 Nov 2014 22:25:03 -0000</pubDate><guid>https://sourceforge.neta7704dbed1d418ef70441a9b845c0b5dd899957e</guid></item><item><title>Script Example Digital Counter modified by Peter Maersk-Moller</title><link>https://sourceforge.net/p/snowmix/wiki/Script%2520Example%2520Digital%2520Counter/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Maersk-Moller</dc:creator><pubDate>Tue, 11 Nov 2014 22:06:48 -0000</pubDate><guid>https://sourceforge.net9b6e97e37c34372c3f6c60ad3692baaa67a4b0d7</guid></item><item><title>Script Example Digital Counter modified by Peter Maersk-Moller</title><link>https://sourceforge.net/p/snowmix/wiki/Script%2520Example%2520Digital%2520Counter/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="script-example-digital-clock-counter"&gt;Script Example Digital Clock Counter&lt;/h1&gt;
&lt;p&gt;This page explains and demonstrates how to use basic Snowmix Scripting to create a digital clock counter. The digital clock counter will display hours, minutes and seconds. We could use text strings, but will in this case load a graphic image of the numbers 0 through 9 and a colon as separator between hours, minutes and seconds.&lt;/p&gt;
&lt;p&gt;Initial we need to a minimum setup for Snowmix as shown below:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;system&lt;/span&gt; &lt;span class="n"&gt;control&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt; &lt;span class="mi"&gt;9999&lt;/span&gt;
    &lt;span class="n"&gt;system&lt;/span&gt; &lt;span class="n"&gt;geometry&lt;/span&gt; &lt;span class="mi"&gt;768&lt;/span&gt; &lt;span class="mi"&gt;576&lt;/span&gt; &lt;span class="n"&gt;BGRA&lt;/span&gt;
    &lt;span class="n"&gt;system&lt;/span&gt; &lt;span class="n"&gt;frame&lt;/span&gt; &lt;span class="n"&gt;rate&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;
    &lt;span class="n"&gt;system&lt;/span&gt; &lt;span class="n"&gt;socket&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;tmp&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mixer1&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We need no video feeds and we will use the sytem feed 0 as background. By default the system feed is black. Now we need to load the images to use as numbers for the clock.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digital&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="n"&gt;x151&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt; &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digital&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="n"&gt;x151&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt; &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digital&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="n"&gt;x151&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt; &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digital&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="n"&gt;x151&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt; &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digital&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="n"&gt;x151&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt; &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digital&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="n"&gt;x151&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt; &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digital&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="n"&gt;x151&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt; &lt;span class="mi"&gt;17&lt;/span&gt; &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digital&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="n"&gt;x151&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt; &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digital&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="n"&gt;x151&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt; &lt;span class="mi"&gt;19&lt;/span&gt; &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digital&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="n"&gt;x151&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;load&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt; &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;digital&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;colon&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;37&lt;/span&gt;&lt;span class="n"&gt;x151&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then we need to place images as hours, minutes and seconds. We will also in this case scale down the images to 1/4 size. In a real case scenario, the images should be scaled perfectly outside Snowmix first before loaded to minimize running load of a running Snowmix system. But in this case, the we do not need to worry about that.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="err"&gt;#&lt;/span&gt; &lt;span class="n"&gt;HH&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;MM&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;SS&lt;/span&gt; &lt;span class="n"&gt;placed&lt;/span&gt; &lt;span class="n"&gt;as&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="mi"&gt;450&lt;/span&gt; &lt;span class="mi"&gt;226&lt;/span&gt; &lt;span class="n"&gt;center&lt;/span&gt; &lt;span class="n"&gt;middle&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="mi"&gt;425&lt;/span&gt; &lt;span class="mi"&gt;226&lt;/span&gt; &lt;span class="n"&gt;center&lt;/span&gt; &lt;span class="n"&gt;middle&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt; &lt;span class="mi"&gt;407&lt;/span&gt; &lt;span class="mi"&gt;226&lt;/span&gt; &lt;span class="n"&gt;center&lt;/span&gt; &lt;span class="n"&gt;middle&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="mi"&gt;390&lt;/span&gt; &lt;span class="mi"&gt;226&lt;/span&gt; &lt;span class="n"&gt;center&lt;/span&gt; &lt;span class="n"&gt;middle&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="mi"&gt;365&lt;/span&gt; &lt;span class="mi"&gt;226&lt;/span&gt; &lt;span class="n"&gt;center&lt;/span&gt; &lt;span class="n"&gt;middle&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt; &lt;span class="mi"&gt;347&lt;/span&gt; &lt;span class="mi"&gt;226&lt;/span&gt; &lt;span class="n"&gt;center&lt;/span&gt; &lt;span class="n"&gt;middle&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="mi"&gt;330&lt;/span&gt; &lt;span class="mi"&gt;226&lt;/span&gt; &lt;span class="n"&gt;center&lt;/span&gt; &lt;span class="n"&gt;middle&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="mi"&gt;305&lt;/span&gt; &lt;span class="mi"&gt;226&lt;/span&gt; &lt;span class="n"&gt;center&lt;/span&gt; &lt;span class="n"&gt;middle&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now we need ensure that the images a overlayed during each frame mix.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="err"&gt;#&lt;/span&gt; &lt;span class="n"&gt;By&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;stack&lt;/span&gt; &lt;span class="n"&gt;will&lt;/span&gt; &lt;span class="n"&gt;have&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;system&lt;/span&gt; &lt;span class="n"&gt;feed&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="n"&gt;as&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;bottom&lt;/span&gt; &lt;span class="n"&gt;background&lt;/span&gt;
    &lt;span class="err"&gt;#&lt;/span&gt; &lt;span class="n"&gt;stack&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;

    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="n"&gt;Show&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;overlay&lt;/span&gt; &lt;span class="mf"&gt;1..8&lt;/span&gt;
      &lt;span class="n"&gt;loop&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;
    &lt;span class="n"&gt;overlay&lt;/span&gt; &lt;span class="n"&gt;finish&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;With the configuration so far, we can now test it and should see hours, minutes and seconds separated by colons displayed as 00:00:00. The above commands is first saved into the file ini/ExampleDigitalCounter.ini.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="n"&gt;src&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;snowmix&lt;/span&gt; &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;ini&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;ExampleDigitalCounter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ini&lt;/span&gt;

    &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;another&lt;/span&gt; &lt;span class="n"&gt;window&lt;/span&gt;

    &lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="n"&gt;scripts&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;output2screen&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;However to have the clock running, we need to create a state-machine setting the state of the clock as time progress. To do that, we use the &lt;em&gt;overlay pre&lt;/em&gt; command.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="n"&gt;PreShow&lt;/span&gt;
      &lt;span class="n"&gt;FrameUpdate25&lt;/span&gt;
      &lt;span class="n"&gt;loop&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;
    &lt;span class="n"&gt;overlay&lt;/span&gt; &lt;span class="n"&gt;pre&lt;/span&gt; &lt;span class="n"&gt;PreShow&lt;/span&gt;

    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="n"&gt;FrameUpdate25&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;
      &lt;span class="n"&gt;SecondUpdate&lt;/span&gt;
      &lt;span class="n"&gt;loop&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Here we know the command macro set with the command &lt;em&gt;overlay pre&lt;/em&gt; is called at frame rate whether or not a &lt;em&gt;shmsrc&lt;/em&gt; is connected to Snowmix. We also know that we have set the framerate to be 25. The result is that the command macro &lt;em&gt;SecondUpdate&lt;/em&gt; is called every second. This can then be used to create a counter as part of the state-machine. First we create the second counter that will count from 00 to 59 and then call the minute counter and reset back to 00.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="n"&gt;SecondUpdate&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="mi"&gt;17&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="mi"&gt;19&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
      &lt;span class="n"&gt;Second10Update&lt;/span&gt;
      &lt;span class="n"&gt;loop&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="n"&gt;Second10Update&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
      &lt;span class="n"&gt;MinuteUpdate&lt;/span&gt;
      &lt;span class="n"&gt;loop&lt;/span&gt;
&lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The minute counter is nearly identical to the second counter.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="n"&gt;MinuteUpdate&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="mi"&gt;17&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="mi"&gt;19&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
      &lt;span class="n"&gt;Minute10Update&lt;/span&gt;
      &lt;span class="n"&gt;loop&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="n"&gt;Minute10Update&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
      &lt;span class="n"&gt;Hour24Update&lt;/span&gt;
      &lt;span class="n"&gt;loop&lt;/span&gt;
&lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now the hour counter is a bit special as we need to count from 00 to 23 and then reset to 00. We can do that by using a counter that counts to 24 as well as updating the hour counter part.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="n"&gt;Hour24Update&lt;/span&gt;
      &lt;span class="n"&gt;HourUpdate&lt;/span&gt;
      &lt;span class="n"&gt;loop&lt;/span&gt; &lt;span class="mi"&gt;23&lt;/span&gt;
      &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;restart&lt;/span&gt; &lt;span class="n"&gt;HourUpdate&lt;/span&gt;
      &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;restart&lt;/span&gt; &lt;span class="n"&gt;Hour10Update&lt;/span&gt;
      &lt;span class="n"&gt;loop&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="n"&gt;HourUpdate&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="mi"&gt;17&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="mi"&gt;19&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
      &lt;span class="n"&gt;Hour10Update&lt;/span&gt;
      &lt;span class="n"&gt;loop&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;

    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="n"&gt;Hour10Update&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;
      &lt;span class="n"&gt;next&lt;/span&gt;
      &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="n"&gt;place&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
      &lt;span class="n"&gt;loop&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now saving all the above commands into an ini file, you can now test the clock as described earlier. The clock will count from 00:00:00 with 1 second interval.&lt;/p&gt;
&lt;p&gt;If we want to set the clock to 09:23:17, we can execute the following commands&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="err"&gt;#&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;Hour24Update&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;pointer&lt;/span&gt; &lt;span class="n"&gt;atline&lt;/span&gt; &lt;span class="n"&gt;SecondUpdate&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;
    &lt;span class="n"&gt;SecondUpdate&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;pointer&lt;/span&gt; &lt;span class="n"&gt;atline&lt;/span&gt; &lt;span class="n"&gt;Second10Update&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="n"&gt;Second10Update&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;pointer&lt;/span&gt; &lt;span class="n"&gt;atline&lt;/span&gt; &lt;span class="n"&gt;MinuteUpdate&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
    &lt;span class="n"&gt;MinuteUpdate&lt;/span&gt;
    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;pointer&lt;/span&gt; &lt;span class="n"&gt;atline&lt;/span&gt; &lt;span class="n"&gt;Minute10Update&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
    &lt;span class="n"&gt;Minute10Update&lt;/span&gt;
    &lt;span class="n"&gt;Hour24Update&lt;/span&gt;
    &lt;span class="n"&gt;Hour24Update&lt;/span&gt;
    &lt;span class="n"&gt;Hour24Update&lt;/span&gt;
    &lt;span class="n"&gt;Hour24Update&lt;/span&gt;
    &lt;span class="n"&gt;Hour24Update&lt;/span&gt;
    &lt;span class="n"&gt;Hour24Update&lt;/span&gt;
    &lt;span class="n"&gt;Hour24Update&lt;/span&gt;
    &lt;span class="n"&gt;Hour24Update&lt;/span&gt;
    &lt;span class="n"&gt;Hour24Update&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Setting the clock manually is as shown a bit difficult although using an external script makes is easier. Another way would be to use the &lt;a class="" href="/p/snowmix/wiki/Tcl%20Interpreter"&gt;embedded Tcl interpreter&lt;/a&gt; and &lt;a class="" href="../Advanced%20scripting"&gt;advanced scripting&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The ini file for this example is available as an attachment to this page.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Maersk-Moller</dc:creator><pubDate>Tue, 11 Nov 2014 22:04:51 -0000</pubDate><guid>https://sourceforge.net4b631aef557f3fb30c38ff3de84e1c00d9b48262</guid></item></channel></rss>