!7 sS denkmodulID = #1013938; sO denkmodul; static long timeout = 60000; static int interval = 50; static double codeUpdateInterval = 60.0; sS listName = "Katze Speech Recognition Log With Date"; sS outListName = "Katze | Things the phone should say"; p { doEvery(100, f update); temp tempSetTL(autoRestartModule_checkInterval, codeUpdateInterval); runInMCVarWithAutoRestart('denkmodul, denkmodulID); } static int lastLength = -1; svoid update { S data = mL_onServer_rawListText_opt(listName); if (lastLength < 0) lastLength = l(data); if (l(data) > lastLength) { S newStuff = substring(data, lastLength); lastLength = l(data); L inputLines = map dropLeadingSquareBracketStuff(whereLeadingSquareBracketStuffContains("phone", nempties(lines(newStuff)))); print("Cat Thinking"); new L out; for (S s : inputLines) { S a = ""; printIndent(s); pcall { a = callAnswerFunction(denkmodul, s); } if (nempty(a)) { out.add(a); printIndent(" >> " + a); } } appendToMechList(outListName, out); } }