AutoTouch findImage函数

时间:2017-02-23 19:02:31

标签: ios iphone lua autotouch

我想做一个疯狂的移动狙击机器人。所以我想使用findImage函数来查找玩家是否已售出。这就是我的想法。

first image second image

第一张图片将是我的屏幕,第二张图片将是我想要找到的图片,如果找到它,它会点击它。这是我的剧本:

local r = findImage ( "/images/auction.bmp" ,1, 1, nil, nil); 
if r == nil then alert ( "nil" ); 
else local n = 0;
    for i, v in pairs (r) do n = n + 1; 
end if n == 0 then alert ( "false" ); 
else 
    alert ( "true" );
    end
end

它运行但总是返回false。所以我想知道我是否正确使用findImage函数,如果是,为什么它不会返回true?

0 个答案:

没有答案