!7 static double interval = 1.0; static new LatestAppearance latest; p-experiment { autoRestart(); startBotHere("Screen Segmenter.", #1015121); S lastName = ""; // mouse repeat with sleep interval { time2 { L list = latest.recordAndSort(thingsOnScreen2()); L rects = segmentedScreenFromCacheFile_last; RectAndMD5 mouse = firstRectAndMD5Containing(rects, mousePt()); S name = ""; if (mouse != null) name = unnull(thingsOnScreenDefinitions().get(mouse.md5)); if (neq(name, lastName)) flatInfoBox_topRightCorner(lastName = name, 1.0); } print(localDateWithSeconds() + ": Found: " + list); consoleTitle(l(list) + " " + joinWithComma(list)); } }