本帖最後由 timzen4321 於 2014-10-29 22:45 編輯
因為我的刪卡程式完成後不會返回
所以我自己加了一行點擊的程式碼
刪卡20的程序很正常
但是刪卡30的程序就會出現
main()出錯 :1663:attempt to call global";
input" (a nil value)
附上程式碼
--刪卡主程序
function clean(x)
if x=="10張" then
touchClick(545*r+xr, 800*r+yr)
sleep(3000);
touchClick(600*r+xr,156*r+yr)
sleep(1000)
touchClick(560*r+xr,250*r+yr)
sleep(1000)
clean2
()
sleep(2000);
touchClick(150*r+xr, 650*r+yr )
sleep(300)
touchClick(150*r+xr, 650*r+yr )
sleep(3000)
net
()
sleep(500)
touchClick(85*r+xr, 180*r+yr);
input(4)
sleep(500)
input(4);
end
if x=="20張" then
touchClick(545*r+xr, 800*r+yr)
sleep(3000);
touchClick(600*r+xr,156*r+yr)
sleep(1000)
touchClick(560*r+xr,250*r+yr)
sleep(1000)
clean2
()
sleep(2000);
touchClick(150*r+xr, 650*r+yr )
sleep(300)
touchClick(150*r+xr, 650*r+yr )
sleep(3000)
net
()
sleep(500);
clean2
()
sleep(2000);
touchClick(150*r+xr, 650*r+yr)
sleep(300)
touchClick(150*r+xr, 650*r+yr )
sleep(3000);
net
()
sleep(500)
touchClick(85*r+xr, 180*r+yr);
input(4)
sleep(500)
input(4)
end
if x=="30張" then
touchClick(545*r+xr, 800*r+yr)
sleep(3000);
touchClick(600*r+xr,156*r+yr)
sleep(1000)
touchClick(560*r+xr,250*r+yr)
sleep(1000)
clean2
()
sleep(2000);
touchClick(150*r+xr, 650*r+yr)
sleep(300)
touchClick(150*r+xr, 650*r+yr)
sleep(3000)
net
()
sleep(500);
clean2
()
sleep(2000);
touchClick(150*r+xr, 650*r+yr)
sleep(300)
touchClick(150*r+xr, 650*r+yr )
sleep(3000);
net
()
sleep(500);
clean2
()
sleep(2000);
touchClick(150*r+xr, 650*r+yr)
sleep(300)
touchClick(150*r+xr, 650*r+yr )
sleep(3000)
net
()
sleep(500)
touchClick(85*r+xr, 180*r+yr);
input(4)
sleep(500)
input(4)
end
end |