Post by kurotamashi on May 1, 2020 5:34:38 GMT
hi everyone, i am using ankulua's snap and play to record the basic clicking. After i get the luar file, i did some modification. the script run without any syntax error but it is not doing what it is suppose to do. can u help me take a look on the code?
touchlist[1] is to click a button to prompt login screen
touchlist[2] is to click the username field which make the caret appear hence i put the type(a) there to enter usename
touchlist[3] is to click the password field which make the caret appear hence i put the type(b) there to enter password
touchlist[4] is to click login
the rest of the touchlist is just in game task.
hence, i run this script it dont even do the touchlist event as the first button was not click. but when i test it at a plain notepad, it did type out the username and password base on the increment of the loop.
anyone know why it dont work?
----- created by AnkuLua snap and play script ------
immersive = true
setImmersiveMode(immersive)
genVersion = "8.7.0-trial"
setAutoGameArea = true
pcall (autoGameArea, setAutoGameArea)
scriptDimension = 1600
Settings:setScriptDimension(true, scriptDimension)
Settings:setCompareDimension(true, scriptDimension)
local index = 1
touchList = {}
waitList = {}
userid = {}
pwd = {}
for i=1,50,1
do
userid[i] = "test"..tostring(i).."@gmail.com"
pwd[i] = "password1"
a=userid[i]
b=pwd[i]
------ 1 -----
touchList[index] = {target = "1.png", region = Region(715, 653, 152, 152), id = "1", action = 'click'}
index = index + 1
------ 2 -----
touchList[index] = {target = "2.png", region = Region(586, 143, 152, 152), id = "2", action = 'click'}
type(a)
index = index + 1
------ 3 -----
touchList[index] = {target = "3.png", region = Region(586, 222, 152, 152), id = "3", action = 'click'}
type(b)
index = index + 1
------ 4 -----
touchList[index] = {target = "4.png", region = Region(719, 323, 152, 152), id = "4", action = 'click'}
index = index + 1
------ 5 -----
touchList[index] = {target = "5.png", region = Region(708, 678, 152, 152), id = "5", action = 'click'}
index = index + 1
------ 6 -----
touchList[index] = {target = "6.png", region = Region(1429, 734, 152, 152), id = "6", action = 'click'}
index = index + 1
------ 7 -----
touchList[index] = {target = "7.png", region = Region(766, 479, 152, 152), id = "7", action = 'click'}
index = index + 1
------ 8 -----
touchList[index] = {target = "8.png", region = Region(399, 349, 152, 152), id = "8", action = 'click'}
index = index + 1
------ 9 -----
touchList[index] = {target = "9.png", region = Region(1098, 514, 152, 152), id = "9", action = 'click'}
index = index + 1
------ 10 -----
touchList[index] = {target = "12.png", region = Region(566, 711, 152, 152), id = "12", action = 'click'}
index = index + 1
------ 11 -----
touchList[index] = {target = "10.png", region = Region(565, 664, 152, 152), id = "10", action = 'click'}
index = index + 1
------ 12 -----
touchList[index] = {target = "11.png", region = Region(568, 695, 152, 152), id = "11", action = 'click'}
index = index + 1
end
touchlist[1] is to click a button to prompt login screen
touchlist[2] is to click the username field which make the caret appear hence i put the type(a) there to enter usename
touchlist[3] is to click the password field which make the caret appear hence i put the type(b) there to enter password
touchlist[4] is to click login
the rest of the touchlist is just in game task.
hence, i run this script it dont even do the touchlist event as the first button was not click. but when i test it at a plain notepad, it did type out the username and password base on the increment of the loop.
anyone know why it dont work?