louis
New Member
Posts: 6
|
Post by louis on Sept 24, 2020 21:49:21 GMT
From the file attached, I want to find both A and B then click C (10 times with 90ms. speed), if not then looping the process again.
|
|
|
Post by AnkuLua on Sept 24, 2020 23:45:26 GMT
Try this
while (true) do if (exists("targetA.png") and exists("targetB.png")) then local loc = exists("targetC.png", 0) if (loc) then for i = 1, 10 do touchDown(loc) wait(0.09) touchUp(loc) end end end end
|
|
louis
New Member
Posts: 6
|
Post by louis on Sept 25, 2020 4:08:51 GMT
Try this while (true) do if (exists("targetA.png") and exists("targetB.png")) then local loc = exists("targetC.png", 0) if (loc) then for i = 1, 10 do touchDown(loc) wait(0.09) touchUp(loc) end end end end Is this correct? ----- created by AnkuLua snap and play script ------ immersive = true setImmersiveMode(immersive) genVersion = "8.8.0-pro2" setAutoGameArea = true pcall (autoGameArea, setAutoGameArea) scriptDimension = 720 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {}
while (true) do if (exists("targetA.png") and exists("targetB.png")) then local loc = exists("targetC.png", 0) if (loc) then for i = 1, 10 do touchDown(loc) wait(0.09) touchUp(loc) end end end end
|
|
louis
New Member
Posts: 6
|
Post by louis on Sept 25, 2020 14:15:42 GMT
Try this while (true) do if (exists("targetA.png") and exists("targetB.png")) then local loc = exists("targetC.png", 0) if (loc) then for i = 1, 10 do touchDown(loc) wait(0.09) touchUp(loc) end end end end Is this correct? ----- created by AnkuLua snap and play script ------ immersive = true setImmersiveMode(immersive) genVersion = "8.8.0-pro2" setAutoGameArea = true pcall (autoGameArea, setAutoGameArea) scriptDimension = 720 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {}
while (true) do if (exists("targetA.png") and exists("targetB.png")) then local loc = exists("targetC.png", 0) if (loc) then for i = 1, 10 do touchDown(loc) wait(0.09) touchUp(loc) end end end end
i'd try to use this scripts but nothing happen. Do you have any suggestion? Please help Y_Y
|
|
|
Post by AnkuLua on Sept 25, 2020 14:42:51 GMT
You should share the screenshots and the images.
|
|
louis
New Member
Posts: 6
|
Post by louis on Sept 25, 2020 15:00:23 GMT
|
|
louis
New Member
Posts: 6
|
Post by louis on Sept 25, 2020 16:46:22 GMT
while (true) do if (exists("1.png") and exists("2.png")) then local loc = click(Location(524, 1186)) if (loc) then for i = 1, 50 do touchDown(loc) wait(0.01) touchUp(loc) end end end end
From the above scripts that you gave me, It's work now. And I want its to click at the marked location, so I'd change the scripts to these "local loc = click(Location(524, 1186))" but it's error. Did I do something wrong? Which API to use with this? Thank you.
|
|
|
Post by AnkuLua on Sept 25, 2020 23:18:28 GMT
Change local loc = click(Location(524, 1186) to local loc = Location(524, 1186)
The final script would be
while (true) do if (exists("1.png") and exists("2.png")) then local loc = Location(524, 1186) if (loc) then for i = 1, 50 do touchDown(loc) wait(0.01) touchUp(loc) end end end end
|
|