|
Post by Kako on Oct 6, 2015 10:17:24 GMT
Is there a way to have asynchcronous (long)clicks?
Something like:
-- ======== sample code ======== clickOn = Location(50, 50)
longClick(clickOn, 60) --Start a long click of a minute somethingExists = exists("something.png") --Check exists while longClick is still running
|
|
|
Post by AnkuLua on Oct 6, 2015 11:26:59 GMT
Is there a way to have asynchcronous (long)clicks? Something like: -- ======== sample code ======== clickOn = Location(50, 50) longClick(clickOn, 60) --Start a long click of a minute somethingExists = exists("something.png") --Check exists while longClick is still running It may take time to study. What app needs the behavior?
|
|
|
Post by mir on Oct 6, 2015 13:46:18 GMT
I found that daemon mode is definitely faster than root mode. But ankulua automatically uses root mode if it's used on a rooted phone. Can I choose which mode to use even if my phone is rooted? I tried denying root permission for ankulua in superuser to no avail. It feels really slow on root mode
|
|
|
Post by AnkuLua on Oct 6, 2015 14:19:36 GMT
I found that daemon mode is definitely faster than root mode. But ankulua automatically uses root mode if it's used on a rooted phone. Can I choose which mode to use even if my phone is rooted? I tried denying root permission for ankulua in superuser to no avail. It feels really slow on root mode You could remove the permission of AnkuLua in superuser. Then stop service. Press "Recents" button of navigation bar, then remove AnkuLua process. Run AnkuLua again. Superuser will ask permission. Say no to it. Then enjoy the speed of daemon. Will provide an option in next version.
|
|
|
Post by zpt on Oct 6, 2015 16:06:32 GMT
findAll("target.png") returns table with matches, but region:findAll("target.png") returns userdata type value which can't be treated as table.
Settings:setCompareDimension(true, 1920) Settings:setScriptDimension(true, 1920)
reg = Region(350,535,1230,420) test1 = findAll("target.png") test2 = reg:findAll("target.png")
print(test1) print("=============") print(test2) prints:
table ============= [M[924,688 -> 926,688 76x79... etc, same matches as in test1, but as one userdata type value.
It must be parsed to get table with Match type values. Functions like pairs() for test2 will give "table expected, got userdata" exception.
AnkuLua 2.1.0
|
|
|
Post by AnkuLua on Oct 6, 2015 16:49:48 GMT
findAll("target.png") returns table with matches, but region:findAll("target.png") returns userdata type value which can't be treated as table. Settings:setCompareDimension(true, 1920) Settings:setScriptDimension(true, 1920)
reg = Region(350,535,1230,420) test1 = findAll("target.png") test2 = reg:findAll("target.png")
print(test1) print("=============") print(test2) prints: table ============= [M[924,688 -> 926,688 76x79... etc, same matches as in test1, but as one userdata type value. It must be parsed to get table with Match type values. Functions like pairs() for test2 will give "table expected, got userdata" exception. AnkuLua 2.1.0 Yes. Region:findAll() return java List, not lua table. I will correct it in the description. To get a table of all matches from region, use one of the followings test2 = ListToTable(reg:findAll("target.png")) test3 = regionFindAll(reg, "target.png" Thanks.
|
|
|
Post by Kako on Oct 7, 2015 14:20:30 GMT
Is there a way to have asynchcronous (long)clicks? Something like: -- ======== sample code ======== clickOn = Location(50, 50) longClick(clickOn, 60) --Start a long click of a minute somethingExists = exists("something.png") --Check exists while longClick is still running It may take time to study. What app needs the behavior? A fighting game: Need to keep the "block" button pressed while checking if we are still "in fight"
|
|
|
Post by AnkuLua on Oct 8, 2015 15:14:58 GMT
Do you need to click other items during the longClick?
|
|
|
Post by Kako on Oct 8, 2015 17:56:49 GMT
Do you need to click other items during the longClick? Not in this case. Maybe some time in the future, but doesn't seem likely.
|
|
|
Post by Badilla on Oct 10, 2015 17:17:22 GMT
How to make click is unlimited any ways ?
|
|
|
Post by Kako on Oct 10, 2015 20:15:34 GMT
How to make click is unlimited any ways ? Take a look at continueClick on the Advanced Methods page, especially the Tap Titans Click example
|
|
|
Post by AnkuLua on Oct 11, 2015 1:00:27 GMT
Thanks. Kako. Just found a way to provide the method you want. Will call it longClickBG(PSMRL, seconds). Will release in next version. Stay tuned.
|
|
|
Post by Badilla on Oct 11, 2015 3:31:26 GMT
How to make click is unlimited any ways ? Take a look at continueClick on the Advanced Methods page, especially the Tap Titans Click example How to know x and y ppsition im so confused
|
|
|
Post by AnkuLua on Oct 11, 2015 3:44:54 GMT
Some code like following
local p = find("target.png") continueClick(p:getX(), p:getY(), 1, 1, 100)
|
|
|
Post by Badilla on Oct 11, 2015 3:57:38 GMT
Some code like following local p = find("target.png") continueClick(p:getX(), p:getY(), 1, 1, 100) i dont understand xD
|
|