|
Post by AnkuLua on Aug 13, 2018 5:59:43 GMT
Another question is could we randomize the timer example wait 2second + random milliseconds? Use math.random() www.lua.org/pil/18.html
|
|
|
Post by derricksrs on Aug 14, 2018 11:53:11 GMT
Hi there,
I got an error when running below script. Syntax error:/sdcard/Ankulua/captured_images/Mulungtest.lua:1:'}' expected near 'id'
Can anyone assist?
touchList[index] = {target = "Dungeon.png", region = Region(489,-32,101,108) id = "Dungeon", action = 'if not exists("Dungeon.png",0) then click(matchResult) end end'}
index = index +1
touchList[index] = {target = "Mulung.png", region = Region(607,141,101,108) id = "Mulung", action = 'if not exists("Mulung.png",0) then click(matchResult) end end'}
index = index +1
touchList[index] = {target = "Enter.png", region = Region(638,375,101,108) id = "Enter", action = 'if not exists("Enter.png",0) then click(matchResult) end end'}
index = index +1
touchList[index] = {target = "Auto.png", region = Region(159,388,101,108) id = "Auto", action = 'if not exists("Auto.png",0) then click(matchResult) end end'}
index = index +1
touchList[index] = {target = "Claim.png", region = Region(351,349,101,108) id = "Claim", action = 'if not exists("Claim.png",0) then click(matchResult) end end'}
index = index +1
|
|
|
Post by AnkuLua on Aug 14, 2018 12:26:47 GMT
You miss "," before "id"
And luar files doesn't work alone. You must run luar files from snapAndPlay script.
|
|
|
Post by derricksrs on Aug 14, 2018 12:30:15 GMT
I see noted.
|
|
|
Post by tunghi on Aug 29, 2018 14:28:31 GMT
Sorry ! i want if found A -> click B -> click C -> click D ,..... i can tick "Alawys search from image . (if not selected , will search from image of found one )" not working !! . Thank you !! I use Ankulua 7.6.0 and snapAndPlay v 2.0.0 Sorry i'm not good at English.
|
|
|
Post by AnkuLua on Aug 29, 2018 15:50:15 GMT
Sorry ! i want if found A -> click B -> click C -> click D ,..... i can tick "Alawys search from image . (if not selected , will search from image of found one )" not working !! . Thank you !! I use Ankulua 7.6.0 and snapAndPlay v 2.0.0 Sorry i'm not good at English. Change the luar touchList[index] = {target = "A.png", region = Region(612, 493, 150, 150), id = "A", action = 'click("B.png"); click("C.png"); click("D.png")'}
|
|
|
Post by tunghi on Aug 29, 2018 18:20:20 GMT
----- created by AnkuLua snap and play script ------ immersive = false setImmersiveMode(immersive) scriptDimension = 720 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {}
------ 1 ----- touchList[index] = {target = "1.png", region = Region(-9, 219, 150, 150), id = "1", action = 'findA_ClickB', target2 = "1drop.png", region2 = Region(-24, 54, 150, 150), id = "1drop",action = 'click' target = "2.png", region = Region(574, 30, 150, 150), id = "2", action = 'click' target = "3.png", region = Region(574, 30, 150, 150), id = "3", action = 'click' target = "4.png", region = Region(574, 30, 150, 150), id = "4", action = 'click'} index = index + 1
This code , but not working ?? . Thank you
|
|
|
Post by AnkuLua on Aug 29, 2018 23:25:49 GMT
----- created by AnkuLua snap and play script ------ immersive = false setImmersiveMode(immersive) scriptDimension = 720 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {} ------ 1 ----- touchList[index] = {target = "1.png", region = Region(-9, 219, 150, 150), id = "1", action = 'findA_ClickB', target2 = "1drop.png", region2 = Region(-24, 54, 150, 150), id = "1drop",action = 'click' target = "2.png", region = Region(574, 30, 150, 150), id = "2", action = 'click' target = "3.png", region = Region(574, 30, 150, 150), id = "3", action = 'click' target = "4.png", region = Region(574, 30, 150, 150), id = "4", action = 'click'} index = index + 1 This code , but not working ?? . Thank you Don't modify the luar this way. Just modify the action = '...' part. Don't modify the other parts.
|
|
|
Post by tunghi on Aug 30, 2018 5:06:28 GMT
----- created by AnkuLua snap and play script ------ immersive = false setImmersiveMode(immersive) scriptDimension = 720 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {}
------ 1 ----- touchList[index] = {target = "1.png", region = Region(-9, 219, 150, 150), id = "1", action = 'findA_ClickB', target2 = "1drop.png", region2 = Region(-24, 54, 150, 150)} index = index + 1
------ 2 ----- touchList[index] = {target = "2.png", region = Region(574, 30, 150, 150), id = "2", action = 'click'} index = index + 1
------ 3 ----- touchList[index] = {target = "3.png", region = Region(276, 316, 150, 150), id = "3", action = 'click'} index = index + 1
------ 4 ----- touchList[index] = {target = "4.png", region = Region(288, 987, 150, 150), id = "4", action = 'click'} index = index + 1 Sorry you ! i undertand !! This is my code , can you help me edit code . If found 1.png -> click 1drop.png -> click 2.png -> click 3.png -> click 4.png ( if not found 1.png , no click 1drop.png , no click 2.png , no lick 3.png, no click 4.png ) Anh i want hide notification "supperuser grant to Ankulua pro " on screen , I see the message always on the screen Thank you so much ! I will buy 4 more accounts
|
|
|
Post by AnkuLua on Aug 30, 2018 12:13:16 GMT
Here is the script
immersive = false setImmersiveMode(immersive) scriptDimension = 720 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {}
------ 1 ----- touchList[index] = {target = "1.png", region = Region(-9, 219, 150, 150), id = "1", action = 'click("1drop.png");click("2.png");click("3.png");click("4.png")'} index = index + 1
To turn off superuser notification SuperSu -> Settings -> notification
To turn off nox superuser notification Settings -> superuser -> Settings (top right three dots) -> notification -> none
|
|
|
Post by tunghi on Aug 31, 2018 10:57:58 GMT
Here is the script immersive = false setImmersiveMode(immersive) scriptDimension = 720 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {}
------ 1 ----- touchList[index] = {target = "1.png", region = Region(-9, 219, 150, 150), id = "1", action = 'click("1drop.png");click("2.png");click("3.png");click("4.png")'} index = index + 1
To turn off superuser notification SuperSu -> Settings -> notification To turn off nox superuser notification Settings -> superuser -> Settings (top right three dots) -> notification -> none Thank you so much !
|
|
|
Post by itagaki on Sept 1, 2018 12:13:55 GMT
this snap and play script.
how to do if A found on A location, then swipe b location then click b location ?
|
|
|
Post by AnkuLua on Sept 1, 2018 13:11:30 GMT
this snap and play script. how to do if A found on A location, then swipe b location then click b location ? First generate luar with A.png, then modify the action of A part in luar as touchList[index] = {target = "A.png", region = Region(9, 219, 150, 150), id = "A", action = 'B= Location(x, y); swipe(matchResult, B); click(B)'} index = index + 1
You need to modify the x and y or B location.
|
|
|
Post by itagaki on Sept 1, 2018 13:16:20 GMT
ok thx.
btw when i tried snap and play script, i never succeed on record swipe action, tried spam swipe when screen is yellow and after yellow gone still swiping. but still not recorded.
is it not possible to record swipe ?
|
|
|
Post by itagaki on Sept 1, 2018 14:42:38 GMT
ah nevermind, i found the problem. swipe it's saved but the starting swipe coordinate and the end swipe coordinate are the same. so it's snap and play script recorder error.
|
|