其实你可以只简单的设置脚本的运行次数和时间间隔,时间间隔470,次数是0的话就会一直循环运行了,我也是刚开始玩这个 单纯循环的话可以在前面加 while true do主入口 function main()while true domSleep(413);touchDown(0,80.691);mSleep(118);touchUp(0);end脚本里面1000是1秒
123456789 x,y=findColorInRegion(颜色1,左上角X,左上角Y,右下角X,右下角Y)ifx~=-1 and y~=-1 then x2,y2=findColorInRegion(颜色2,x-20,y-20,x+20,y+20) ifx2~=-1 and y2~=-1 then touchDown(0,坐标一x,坐标一y) mSleep(20) touchUp(0) endend可以帮你实现