State machines can be a powerful way to sequence execution. This is a link to a package to implement Moore type state machines in Tcl. http://chiselapp.com/user/mangoa01/repository/mrtools/doc/tip/moore/wiki/intro.wiki It is rather more complete than the simpler examples on the wiki, of course, at the expense of a bit more learning curve. It is large enough that it is hard to deal with as a wiki page, so I have put it in Fossil repository that I have been building for some of these types of tools. ---- [jhjl] Using Tcl8.6 on Windows 7 I get an error loading the package. I tried a `'''teacup update'''` but problem persists. ====== package require moore 1.9 unknown data type, "dict" while executing "relvar create StateMachine { MachineId string ModelName string CurrState string Options dict..." (in namespace eval "::moore" script line 35) invoked from within "namespace eval ::moore { variable revision 1.9 namespace export model namespace export generate namespace export delay namespace ..." (file "C:/Tcl/lib/teapot/package/tcl/teapot/tcl8/8.5/moore-1.9.tm" line 93) invoked from within "source -encoding utf-8 C:/Tcl/lib/teapot/package/tcl/teapot/tcl8/8.5/moore-1.9.tm" ("package ifneeded moore 1.9" script) invoked from within "package require moore" ("uplevel" body line 1) invoked from within "uplevel #0 {package require moore}" invoked from within "interp eval $::tkcon::OPT(exec) $args" (procedure "::tkcon::EvalSlave" line 2) invoked from within "EvalAttached $cmd" ====== <>Design