|
Post by zenkrye on Feb 11, 2022 21:46:03 GMT
Is it possible to nest the images 'snap and play' is tyring to look for to speed some instances up?
Exapmle: Searching for Image A, B & C. If Image A found then search for Image D, E, & F If Image B Found then search for Image G, H & I etc.
Thanks in advance for any advice.
|
|
|
Post by superchicken on Apr 21, 2022 7:28:12 GMT
My emulator runs to loop 3, the script cant loop , Ankulua is still running but not swipe
while (true) do ------ 1 ----- for i = 1, 32 do swipe(Location(974, 676), Location(986, 287)) wait(2) end ------ 33 ----- click(Location(824, 66)) wait(5) end
|
|
|
Post by AnkuLua on Apr 21, 2022 7:41:52 GMT
My emulator runs to loop 3, the script cant loop , Ankulua is still running but not swipe while (true) do ------ 1 ----- for i = 1, 32 do swipe(Location(974, 676), Location(986, 287)) wait(2) end ------ 33 ----- click(Location(824, 66)) wait(5) end Make sure the loop is executed. You can add highlight or print to debug. make sure the swipe locations are correct. Highlight the locations. Region(974, 676, 5, 5):highlight(2) Region(986, 287, 5, 5):highlight(2) swipe longer to make it like drag and drop swipe(Location(974, 676), Location(986, 287), 5)
|
|
thann
New Member
Posts: 8
|
Post by thann on May 16, 2022 13:31:16 GMT
Could it possibly to modify to
if find A and B then click C
Thanks
|
|
|
Post by AnkuLua on May 16, 2022 14:50:26 GMT
Could it possibly to modify to if find A and B then click C Thanks In A.png, modify the action to action = 'if(exists("B.png", 0)) then existsClick("C.png", 0) end'
|
|
thann
New Member
Posts: 8
|
Post by thann on May 16, 2022 15:58:46 GMT
Could it possibly to modify to if find A and B then click C Thanks In A.png, modify the action to action = 'if(exists("B.png", 0)) then existsClick("C.png", 0) end' Thank you very much.
|
|
thann
New Member
Posts: 8
|
Post by thann on May 16, 2022 17:14:35 GMT
|
|
|
Post by AnkuLua on May 16, 2022 23:14:21 GMT
If the aspect ratio is the same on both devices, then just copy the luar and corresponding image directory to the new device. Otherwise, there is no direct way to do it.
|
|
|
Post by thuanthanh1992 on Nov 27, 2023 9:14:27 GMT
----- created by AnkuLua snap and play script ------ immersive = false setImmersiveMode(immersive) genVersion = "9.0.4-pro2" setAutoGameArea = true pcall (autoGameArea, setAutoGameArea) scriptDimension = 854 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {}
------ 1 ----- touchList[index] = {target = "A.png", region = Region(394, 341, 152, 152), id = "A", action = 'click("B.png")'} index = index + 1
------ 2 ----- touchList[index] = {target = "B.png", region = Region(660, 347, 152, 152), id = "B", action = 'click'} index = index + 1
------ 3 ----- touchList[index] = {target = "C.png", region = Region(559, 345, 152, 152), id = "C", action = 'click'} index = index + 1
------ 4 ----- touchList[index] = {target = "D.png", region = Region(271, 213, 152, 152), id = "D", action = 'click'} index = index + 1
------ 5 ----- touchList[index] = {target = "E.png", region = Region(399, 342, 152, 152), id = "E", action = 'click'} index = index + 1
------ 6 ----- touchList[index] = {target = "F.png", region = Region(656, 285, 152, 152), id = "F", action = 'click'} index = index + 1
Hi help me fix this code pls , if code can't found A , i want script wait come to found A and run continue , thank so much
|
|
|
Post by AnkuLua on Nov 27, 2023 23:43:09 GMT
----- created by AnkuLua snap and play script ------ immersive = false setImmersiveMode(immersive) genVersion = "9.0.4-pro2" setAutoGameArea = true pcall (autoGameArea, setAutoGameArea) scriptDimension = 854 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {} ------ 1 ----- touchList[index] = {target = "A.png", region = Region(394, 341, 152, 152), id = "A", action = 'click("B.png")'} index = index + 1 ------ 2 ----- touchList[index] = {target = "B.png", region = Region(660, 347, 152, 152), id = "B", action = 'click'} index = index + 1 ------ 3 ----- touchList[index] = {target = "C.png", region = Region(559, 345, 152, 152), id = "C", action = 'click'} index = index + 1 ------ 4 ----- touchList[index] = {target = "D.png", region = Region(271, 213, 152, 152), id = "D", action = 'click'} index = index + 1 ------ 5 ----- touchList[index] = {target = "E.png", region = Region(399, 342, 152, 152), id = "E", action = 'click'} index = index + 1 ------ 6 ----- touchList[index] = {target = "F.png", region = Region(656, 285, 152, 152), id = "F", action = 'click'} index = index + 1 Hi help me fix this code pls , if code can't found A , i want script wait come to found A and run continue , thank so much How long do you want to wait A? Change the 10 seconds to the value that you want ----- created by AnkuLua snap and play script ------ immersive = false setImmersiveMode(immersive) genVersion = "9.0.4-pro2" setAutoGameArea = true pcall (autoGameArea, setAutoGameArea) scriptDimension = 854 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {}
exists("A.png", 10)
------ 1 ----- touchList[index] = {target = "A.png", region = Region(394, 341, 152, 152), id = "A", action = 'click("B.png")'} index = index + 1
------ 2 ----- touchList[index] = {target = "B.png", region = Region(660, 347, 152, 152), id = "B", action = 'click'} index = index + 1
------ 3 ----- touchList[index] = {target = "C.png", region = Region(559, 345, 152, 152), id = "C", action = 'click'} index = index + 1
------ 4 ----- touchList[index] = {target = "D.png", region = Region(271, 213, 152, 152), id = "D", action = 'click'} index = index + 1
------ 5 ----- touchList[index] = {target = "E.png", region = Region(399, 342, 152, 152), id = "E", action = 'click'} index = index + 1
------ 6 ----- touchList[index] = {target = "F.png", region = Region(656, 285, 152, 152), id = "F", action = 'click'} index = index + 1
|
|
|
Post by thuanthanh1992 on Nov 28, 2023 7:52:14 GMT
thank you for support , help me one more time pls
----- created by AnkuLua snap and play script ------ immersive = false setImmersiveMode(immersive) genVersion = "9.0.4-pro2" setAutoGameArea = true pcall (autoGameArea, setAutoGameArea) scriptDimension = 854 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {}
exists("A.png", 10)
------ 1 -----
touchList[index] = {target = "A.png", region = Region(387, 340, 152, 152), id = "A", action = 'click("B.png")'} index = index + 1
------ 3 ----- touchList[index] = {target = "C.png", region = Region(559, 345, 152, 152), id = "C", action = 'click'} index = index + 1
------ 4 ----- touchList[index] = {target = "D.png", region = Region(271, 213, 152, 152), id = "D", action = 'click'} index = index + 1
------ 5s ----- touchList[index] = {target = "F.png", region = Region(656, 285, 152, 152), id = "F", action = 'click'} index = index + 1
------ 6 ----- touchList[index] = {target = "oksell.png", region = Region(350, 212, 152, 152), id = "oksell", action = 'click("oksell.png")'} index = index + 1
------ 7 ----- touchList[index] = {target = "cancel.png", region = Region(686, 352, 152, 152), id = "cancel", action = 'click("cancel.png")'} index = index + 1
------ 8 ----- touchList[index] = {target = "E.png", region = Region(399, 342, 152, 152), id = "E", action = 'click'} index = index + 1 ------ 9 ----- touchList[index] = {target = "rep.png", region = Region(603, 296, 152, 152), id = "rep", action = 'click'} index = index + 1
------ 10 ----- touchList[index] = {target = "gaint.png", region = Region(666, 286, 152, 152), id = "gaint", action = 'click'} index = index + 1
i want fix this code : If can't find cancel.png play next step Or : If can't find cancel.png click E
Thank
|
|
|
Post by rxrickify on Apr 22, 2024 8:00:53 GMT
Do I have to manually edit the script to get the "If A found click B" function to work cuz I noticed it lets you pick that as one of the options. Also which file would I edit, the .BAK or .LUAR? I'm editing both using notepad and it only lets me save it as a .TXT file
|
|
|
Post by kvid72 on Apr 22, 2024 10:11:46 GMT
Hello. How do I change the script If A found click B location. So would he click on B quickly a certain number of times or for a period of time?
|
|
|
Post by AnkuLua on Apr 23, 2024 1:26:18 GMT
Do I have to manually edit the script to get the "If A found click B" function to work cuz I noticed it lets you pick that as one of the options. Also which file would I edit, the .BAK or .LUAR? I'm editing both using notepad and it only lets me save it as a .TXT file No. You don't need to edit the script for "If A found click B". Just use the swipe from A to B when recording. You should edit .luar And select other app to edit. It's strange that an app only allow saving as a .txt file
|
|
|
Post by AnkuLua on Apr 23, 2024 1:30:22 GMT
Hello. How do I change the script If A found click B location. So would he click on B quickly a certain number of times or for a period of time? edit the .luar file. find the line with A.png and change the action to action = 'continueClick(Location(bx, by), 30)' here bx, by is the location of B. and 30 is the clicking times. Change them according to your requirement.
|
|