sclass WebBotTester { S botURL; // without the "/incremental" S cookie = "test_" + aGlobalID(); int n; // number of messages grabbed Thread grabThread; volatile bool closed; LS allHtml = syncList(); new L msgs; sclass Msg { S html; bool fromUser; long timeReceived; } public void close { set closed; cancelAndInterruptThread(grabThread); } void start { if (grabThread == null) grabThread = startThread(r grabLoop); } void grabLoop { while (!closed) { S html = loadPageWithTimeout(botURL + "/incremental" + hquery(+cookie, a := n); allHtml.add(html); sleepSeconds(1); } } }