1043141712
1043141712

注册于 3年前

回答
4
文章
0
关注者
0

路径C:UsersadminA p p D a taRoaming触摸精灵-控制中心
}
删除],
"D at a Pa t h": "C:\Users\admin\A p p D a ta\Roaming\触摸精灵-控制中心"
}

函数:
function clickMove(x1, y1, x2, y2, n) ---滑动

local w = math.abs(x2 - x1)
local h = math.abs(y2 - y1)
touchDown(0, x1, y1)
mSleep(50)
if x1 < x2 then
    w1 = n
else
    w1 = -n
end
if y1 < y2 then
    h1 = n
else
    h1 = -n
end
if w >= h then
    for i = 1, w, n do
        x1 = x1 + w1
        if y1 == y2 then
        else
            y1 = y1 + math.ceil(h * h1 / w)
        end
        touchMove(0, x1, y1)
        mSleep(10)
    end
else
    for i = 1, h, n do
        y1 = y1 + h1
        if x1 == x2 then
        else
            x1 = x1 + math.ceil(w * w1 / h)
        end
        touchMove(0, x1, y1)
        mSleep(10)
    end
end
mSleep(50)
touchUp(0)

end
实例:
clickMove(100,100,200,200,5);--x1,y1为起始位置坐标,x2、y2为终点位置坐标,n是每次移动多少个像素

function jsmz()

hz = {"睢", "己", "汨", "氽", "祗", "妺", "囗", "姫", "巿", "夊", "帀", "匚", "釆", "晩", "匸", "掱", "祒", "袑", "祼"}
num = math.random(1, 19)
return hz[num]

end
for i = 1, 7, 1 do

        inputText(jsmz())
        mSleep(500)
    end

发布
问题