触摸精灵吧 关注:11,853贴子:44,838
  • 1回复贴,共1

求助一个简单的脚本问题

只看楼主收藏回复

--[START]
--[TYPE]:1
--[APPVERSION]:1.0
--[DESCRIPTION]:MSN朋友
--[END]
--module文件(*.lua,*.txt)放入modules文件夹然后脚本里面require调用
--以上部分请不要随意修改!
function main()
x, y = findImage("/sdcard/1.bmp");
if x ~= -1 and y ~= -1 then
touchDown(1, x+5, y+5);
mSleep(2000);
touchMove(0, x+5, y+5);
mSleep(2000);
mSleep(4);
notifyMessage("yes1");
mSleep(2000);
else
mSleep(2000);
mSleep(4);
notifyMessage("no1")
mSleep(2000);
end
mSleep(2000);
x, y = findImage("/sdcard/2.bmp");
if x ~= -1 and y ~= -1 then
mSleep(2000);
touchDown(2, x+5, y+5);
mSleep(4);
touchUp(0);
touchUp(1);
touchUp(2);
mSleep(2000);
notifyMessage("yes2");
mSleep(2000);
else
notifyMessage("no2")
mSleep(2000);
end
end
上面这个脚本是找到图1按住2秒并把图1移动到图2位子,之后自动停止脚本,如果图1个图2任一个没有找到脚本继续运行。这个脚本没什么大用,是做来玩的,我刚接触脚本还有很多不懂,还请大神指点。小弟先谢谢了。


IP属地:辽宁来自Android客户端1楼2014-02-25 12:03回复
    没人知道吗


    来自手机贴吧2楼2014-02-25 13:14
    回复