!7 sclass PossibleHScrollbar { Rect slider; int hIdx; } p { // Find candidates RGBImage rgb = shootScreen(); //loadImage(#1006358; ocr_explodedView1_init(); L vClips = ocr_wideBlack_vsplit(rgb); int iLine = 0; new L hCandidates; int y = 0; for i over vClips: { RGBImage line = rgb.clip(vClips.get(i)); L lineClips = ocr_highBlack_hsplit(line); //print("Line " + (++iLine) + " (" + r + "): " + struct(lineClips)); int x = 0; for j over lineClips: { Rect clip = lineClips.get(j); if (clip.w == 1) hCandidates.add(nu(PossibleHScrollbar, slider := new Rect(x, y, clip.w, clip.h), hIdx := j)); x += clip.w; } y += line.h(); } printStruct(+hCandidates); // Keep shooting, check candidates for movement while licensed { sleepSeconds(2); print("Shooting & checking for scrollbar movement"); rgb = shootScreen(); //loadImage(#1006358; vClips = ocr_wideBlack_vsplit(rgb); y = 0; int iHC = 0; for i over vClips: { // find candidates for this line while (iHC < l(hCandidates) && hCandidates.get(iHC).slider.y < y) ++iHC; if (iHC >= l(hCandidates)) break; int jHC = iHC; while (jHC < l(hCandidates) && hCandidates.get(jHC).slider.y == y) ++jHC; if (jHC > iHC) { // any candidates for this line L lineCandidates = subList(hCandidates, iHC, jHC); RGBImage line = rgb.clip(vClips.get(i)); L lineClips = ocr_highBlack_hsplit(line); int x = 0; for j over lineClips: { Rect clip = lineClips.get(j); if (clip.w == 1) { PossibleHScrollbar sb = findWhere(lineCandidates, xIdx := x); if (sb != null) print("Horizontal slider move: " + sb.slider.x + " => " + x); } x += clip.w; } } y += vClips.get(i).h; } } }