!7 p-type { conceptsToEnglishInfoBox(); for i to 10: print(random(keys(aiConceptsMap_cached()))); } static Window conceptsToEnglishInfoBox_box; svoid conceptsToEnglishInfoBox { thread "Info Box" { Window infoBox = null; S lastMsg = ""; repeat with ms sleep 500 { Component c = componentAtMouse(); S word = wordAtMouse(), msg = ""; if (possibleGlobalID(word)) { aiConceptsMap_clearCache(60); // clear cache every 60 seconds S name = conceptToName(word); if (neq(name, word)) msg = word + ": " + name; } if (neq(msg, lastMsg)) { lastMsg = msg; disposeWindow(infoBox); infoBox = null; if (nempty(msg)) { infoBox = infoMessage_noprint(msg); if (c instanceof JComponent) setToolTipText((JComponent) c, msg); } } } } }