!7 cmodule FindActiveTab > DynPrintLogAndEnabled { transient CloseToColorPredicate solution = new(0x266D9F, 0.05051); transient int gridSize = 4; start { doEvery(1.0, r doIt); } void doIt { if (!enabled) ret; time "Shoot" { BufferedImage img = shootScreenArea(0, 0, screenWidth(), 50); } time "Analyze" { RGBImage rgb = new(scaleImageWithFactor(1.0/gridSize, img)); DoublePt pt = centroidForColorPredicate(solution, rgb); } if (pt == null) ret with print("No result"); int x = iround(pt.x*gridSize), y = iround(pt.y*gridSize); print(x + "/" + y); pointArrowsToArea(toRectangle(rectAround(x, y, 80, 30)), 1.0); } }