!752 concepts. !include #1005686 // PIF Classes v2 static L images; static float similarity = 0.99f; concept LastFound { BWImage img; Rect position; } p { concepts(); images = loadGoodClipsFrom("#1005676"); while licensed { step(); sleepSeconds(1); } } svoid step { LastFound lf = latest(LastFound); if (lf != null && verify(lf)) print("Verified!"); else { deleteAll(LastFound); fullSearch(); lf = latest(LastFound); if (lf != null && verify(lf)) print("Verified!"); else print("Not found."); } } svoid fullSearch { print("Full search."); BWImage big = new BWImage(shootScreen2()); for (BWImage pat : images) for (FoundImg fi : bwRawImageSearch(big, pat, similarity)) { cnew(LastFound, img := pat, position := fi.r); print("Found."); ret; } } sbool verify(LastFound lf) { try { ret bwImagesSimilar(new BWImage(shootScreen2(lf.position)), lf.img, similarity); } catch e { printShortException(e); false; } }