math.randomseed(os.time()) function sleep(s) usleep(s * 1000); end function an(path) for i=1, 20 do toast(i,1) sleep(math.random(600,700)) local an = findImage(rootDir()..path, 1, 0.99,nil, false); if table.tostring(an) ~= "{}" then local an1 = an[1][1]; local an2 = an[1][2]; sleep(math.random(90,100)) tap (an1,an2); sleep(math.random(600,800)) break end end end a=50 appActivate("com.apple.MobileSMS"); sleep(math.random(2000,3000)) for i=1,15 do touchDown(3, 335.63, 1029.77); usleep(17868.46); touchMove(3, 345.89, 886.23); usleep(16631.88); touchMove(3, 420.82, 630.67); usleep(16070.33); touchUp(3, 424.92, 626.59); sleep(math.random(1800,2500)) end sleep(math.random(4000,5000)) an("/Screenshots/sua.PNG") sleep(math.random(1500,2000)) an("/Screenshots/tinnhan.PNG") sleep(math.random(2000,3000)) for i=1,2000 do touchDown(5, 338.71, 1171.30); usleep(34550.96); touchMove(5, 335.63, 1161.12); usleep(16861.00); touchMove(5, 335.63, 1140.75); usleep(16698.29); touchMove(5, 334.60, 1103.09); usleep(16512.46); touchMove(5, 334.60, 1046.08); usleep(16557.38); touchMove(5, 334.60, 959.52); usleep(16684.42); touchMove(5, 337.68, 860.76); usleep(16753.88); touchMove(5, 344.87, 761.00); usleep(16606.00); touchMove(5, 347.95, 664.27); usleep(16699.67); touchMove(5, 351.02, 574.67); usleep(16674.92); touchMove(5, 355.13, 490.17); usleep(16603.38); touchMove(5, 361.29, 409.73); usleep(16686.42); touchMove(5, 366.42, 341.52); usleep(16670.83); touchMove(5, 371.56, 287.56); usleep(16630.33); touchMove(5, 379.76, 227.49); usleep(16708.00); touchMove(5, 391.06, 172.51); usleep(16807.21); touchMove(5, 398.24, 133.82); usleep(16827.42); touchMove(5, 401.32, 107.35); usleep(16362.21); touchMove(5, 402.34, 89.01); usleep(16740.17); touchMove(5, 402.34, 77.82); usleep(16605.46); touchMove(5, 402.34, 71.71); usleep(16669.79); touchMove(5, 402.34, 70.69); usleep(66903.25); touchMove(5, 402.34, 71.71); usleep(16414.38); touchMove(5, 402.34, 72.73); usleep(16933.92); touchMove(5, 403.37, 74.76); usleep(15447.50); touchUp(5, 406.45, 78.84); sleep(math.random(1500,1800)) toast("chọn tin",1) for n=1,7 do toast(n,1) sleep(math.random(600,700)) local chon = findImage(rootDir().."/Screenshots/chon.PNG", 1, 0.99,nil, false); if table.tostring(chon) ~= "{}" then local chon1 = chon[1][1]; local chon2 = chon[1][2]; sleep(math.random(90,100)) tap (chon1,chon2); sleep(math.random(400,600)) end end if i == a then an("/Screenshots/xoa.PNG") toast("xóa",1) sleep(math.random(1000,1300)) a=a+50 appKill("com.apple.MobileSMS"); sleep(math.random(2000,3000)) appActivate("com.apple.MobileSMS"); sleep(math.random(2000,3000)) for i=1,15 do touchDown(3, 335.63, 1029.77); usleep(17868.46); touchMove(3, 345.89, 886.23); usleep(16631.88); touchMove(3, 420.82, 630.67); usleep(16070.33); touchUp(3, 424.92, 626.59); sleep(math.random(1800,2500)) end sleep(math.random(4000,5000)) an("/Screenshots/sua.PNG") sleep(math.random(1500,2000)) an("/Screenshots/tinnhan.PNG") sleep(math.random(2000,3000)) end end