static int dm_placeModuleUnderAIBar_expiry = 4000; svoid dm_placeModuleUnderAIBar(O moduleOrID, fS query) { fO module = dm_getModule(moduleOrID); fS moduleID = dm_moduleID(moduleOrID); dm_showModule_noFocus(module); swing { JTextComponent aiBar = cast getCreatorOpt('tfTopInput); Rect mr = dm_getBounds(module); if (aiBar != null && mr != null) { Rectangle r = getBounds(aiBar); T3 p = optCast(T3, quickImport(dm_generalMap_get('modulesUnderAIBar_y))); bool first = !(p != null && eq(p.b, query) && sysNow() <= p.c+dm_placeModuleUnderAIBar_expiry); int y = first ? 0 : p.a; if (first) dm_generalMap_put('modulesUnderAIBar_firstModule, moduleID); //print("dm_place: " + p + " / " + y); dm_setBounds(module, r.x, y, r.width, mr.h); dm_generalMap_put('modulesUnderAIBar_y, t3(y+mr.h, query, y == 0 ? sysNow() : p.c)); } } }