!7 static JLabel lblText; sS phoneIP; p { printCachedPainterSizeEvery(30); swing { setText_opt = false; setConsoleWidth(800); setConsoleHeight(600); centerConsole(); consoleFont(sansSerif(40)); wordWrapConsole(); consoleMaxChars(1000); } while licensed { print("Waiting for phone to come online..."); while licensed { L possiblePhones = empBlast(); if (nempty(possiblePhones)) print("Possible phones: " + struct(possiblePhones)); phoneIP = first(possiblePhones); if (phoneIP != null) break; sleepSeconds(1); } print("Using phone: " + phoneIP); setConsoleTitle(phoneIP); S last = ""; swing { manualConsole(); //consoleTextArea().setAlign lblText = jcenteredlabel(); lblText.setFont(sansSerif(40)); replaceComponent(consoleTextArea(), lblText); } repeat with sleep 1 { S s = sendToPublicCommBotSilently(phoneIP, forward("Recognizer.", "text")); s = substring(s, smartIndexOf(s, ":")+1); //S ss = dropPrefixTrim(last, s); S ss = joinLines(takeLast(12, javaTokC(s))); last = s; if (nempty(ss)) { setText_htmlencode(lblText, ss); setConsoleTitle(join(" ", takeLast(2, javaTokC(s))) + " - " + phoneIP); awt { lblText.scrollRectToVisible(new Rectangle(0, 10000, 1, 1)); } } } } }