|
Post by scy123 on Jun 10, 2017 18:24:15 GMT
When the screen is yellow i press the button, but the button does not get pressed in the game, so it does not move me to the next screen
|
|
|
Post by AnkuLua on Jun 11, 2017 0:58:20 GMT
Which game are you playing?
|
|
|
Post by scy123 on Jun 11, 2017 1:16:57 GMT
Naruto Ninja Blazing
|
|
|
Post by scy123 on Jun 11, 2017 3:16:31 GMT
Their must be something wrong with my phone, when I use an emulator it works fine. any idea what it could be? I have the new Samsung Galaxy s8+.
|
|
|
Post by AnkuLua on Jun 11, 2017 4:39:00 GMT
In fact, on other devices, you can use the script generated on emulator. All required is that the aspect ratio is the same. You can tune the emulator resolution according to S8+.
|
|
|
Post by andi1203 on Jun 13, 2017 8:01:32 GMT
This is how it works perfectly. I have now also bought the pro version
|
|
|
Post by super7 on Jun 16, 2017 13:41:33 GMT
Bought pro version 😁
Snap and play is very useful script. Where can I find explanation what all commands mean and do in the .luar file so I can manually modify when needed?
Can you explain what it all means? When should I use immersive mode?
----- created by AnkuLua snap and play script ------ immersive = false setImmersiveMode(immersive) scriptDimension = 1920 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {}
------ 1 ----- touchList[index] = {target = "1.png", region = Region(724, 287, 72, 42), id = "1", action="click"} index = index + 1
------ 2 ----- touchList[index] = {target = "2.png", region = Region(721, 238, 72, 42), id = "2", action="click"} index = index + 1
------ 3 ----- touchList[index] = {target = "3.png", region = Region(703, 738, 502, 42), id = "3", action="click"} index = index + 1
I would like to be able to find a picture, make snap and issue command in different place than snap location. In other words when snap is found touch in other location.
It would be very useful if you could freeze game before snap and visually manipulate snap dimensions before taking it. It's many times I'm not happy with snap taken.
Thx
|
|
|
Post by AnkuLua on Jun 16, 2017 15:34:14 GMT
>> Can you explain what it all means? target: the searching picture filename region: the searching region. To make it searching the whole screen, assign nil to it. id: the return id when picture found action: the action to take on the found picture. It could be one of click, longClick, doubleClick, continueClick, dragDrop and swipe. For swipe and dragDrop, two extra objects are needed, region2 and target2.
>> When should I use immersive mode? You use immersive mode if there is no navigation bar.
>> I would like to be able to find a picture, make snap and issue command in different place than snap location. In other words when snap is found touch in other location. You need to modify the sanpAndPlay.lua script. On line 612, just after the line with "local choice, id, match = regionWaitMulti(touchList, 30, debug, nil, index)" add following scripts if (id == "the id of target picture") then click(location of picture filename) else ...
>> It would be very useful if you could freeze game before snap and visually manipulate snap dimensions before taking it. It's many times I'm not happy with snap taken. Will consider it.
|
|
|
Post by super7 on Jun 16, 2017 19:26:01 GMT
What's wrong in this script I created after your guidance.
(When 1.png found on the whole screen, click position 609,726.)
------ 1 ----- touchList[index] = {target = "1.png", region = Region(), id = "1", action="click(609,726)"} index = index + 1
I get debug message when playback, but don't know how to copy it to show here.
|
|
|
Post by AnkuLua on Jun 17, 2017 0:01:01 GMT
You did it in the wrong way. The message sent is
>> I would like to be able to find a picture, make snap and issue command in different place than snap location. In other words when snap is found touch in other location. You need to modify the sanpAndPlay.lua script. On line 612, just after the line with "local choice, id, match = regionWaitMulti(touchList, 30, debug, nil, index)" add following scripts if (id == "the id of target picture") then click(location of picture filename) else In your case the line 612 of snapAndPlay.lua should be modified as
local choice, id, match = regionWaitMulti(touchList, 30, debug, nil, index)
if (id == 1) then click(Location(609, 720)) elseif (choice ~= -1 and match) then if (debug) then print("find "..id) end
|
|
|
Post by super7 on Jun 17, 2017 15:59:32 GMT
I updated snapandplay script but I guess I still need to make changes to luar file as it keeps clicking on region specified in luar file. So it doesn't click on location specified click(Location(609, 720)).
It should click on specified location when snap is found and not click when snap not found. Now when snap is found it clicks on region area.
------ 1 ----- touchList[index] = {target = "1.png", region = Region(180, 235, 280, 230), id = "1", action="click"} index = index + 1
|
|
|
Post by AnkuLua on Jun 18, 2017 1:35:36 GMT
Did you add the line? if (id == "1") then
You don't need to modify the luar file.
|
|
|
Post by super7 on Jun 18, 2017 3:24:28 GMT
Thx
It works now. "" sign was missing. I had 1 instead of "1".
How should it be when I want more more snaps to work like that?
Is it OK below?
local choice, id, match = regionWaitMulti(touchList, 30, debug, nil, index)
if (id == "1") then
click(Location(609, 720))
elseif (id == "5") then
click(Location(345, 70))
elseif (id == "22") then
click(Location(1290, 390))
elseif (choice ~= -1 and match) then if (debug) then print("find "..id) end
|
|
|
Post by AnkuLua on Jun 18, 2017 4:13:34 GMT
Sure.
|
|
|
Post by super7 on Jun 19, 2017 14:35:17 GMT
What should I do now to delay checking certain regions. Problem exists when ankulua starts checking other regions too early when other screen is loading. When the other screen is fully loaded and check is in progress it misses items on the screen.
How to implement wait command after a certain region was found and clicked to delay further checks?
Thx
|
|