|
Post by curval on Apr 26, 2016 20:46:56 GMT
I want to "wait some seconds that a menu appears, if not do something else":
Unfortunately "onAppear" is not supported.
So I'm trying:
Region:wait(Pattern("menu.png"),10)
but that can crash with a not found exception.
Unfortunately Region.setThrowException(false) or Region.setFindFailedResponse(skip) seems to be not supported,too. :-(
Last idea:
while (not menu:exists(Pattern("menu.png"):similar(0.8), 0)) do wait(1) end
But that keeps the risk for an unwanted endless loop. :-(
|
|
|
Post by AnkuLua on Apr 26, 2016 23:11:54 GMT
Why not
if (menu:exists(Pattern("menu.png"):similar(0.8), 10)) then -- do something else -- do other things end
|
|
|
Post by curval on Apr 27, 2016 16:06:57 GMT
Hurray!
It works very fine. I didn't recognize that "exists" also has a timer.
Many thanks for your support!
|
|
maomi
New Member
Posts: 4
|
Post by maomi on May 7, 2016 15:12:11 GMT
Hello, I am trying to move my screen (i.e. touch anywhere on the screen, and slide finger upwards.) Is dragDrop the correct method? I used dragDrop(Location(1000,700), Location(1000,300)) but my screen doesn't move.
PS: Thanks for making such a cool app!
|
|
|
Post by AnkuLua on May 7, 2016 23:10:13 GMT
Yes. It's correct. But the result depends on the app (game). You can also try swipe()
|
|
maomi
New Member
Posts: 4
|
Post by maomi on May 8, 2016 13:06:33 GMT
Yes. It's correct. But the result depends on the app (game). You can also try swipe() Thanks! swipe() works for me! Btw, is there a code for flick? (instead of drag /swipe)
|
|
|
Post by AnkuLua on May 8, 2016 13:08:16 GMT
Yes. It's correct. But the result depends on the app (game). You can also try swipe() Thanks! swipe() works for me! Btw, is there a code for flick? (instead of drag /swipe) What's flick? Isn't it some kind of dragDrop/swipe?
|
|
maomi
New Member
Posts: 4
|
Post by maomi on May 8, 2016 14:14:49 GMT
Thanks! swipe() works for me! Btw, is there a code for flick? (instead of drag /swipe) What's flick? Isn't it some kind of dragDrop/swipe? It's like if you swipe, but the screen will continue to scroll for a while according to how much force you use. (It's not important. I can make do with swipe. Was just wondering) Another question, i'm using findAll(), but if nothing is found, I get an error. I tried to catch it like, if (table.getn(test1))==0 then -- code else --code end but it doesn't work. Is that the right way to catch an empty findAll()?
|
|
|
Post by AnkuLua on May 8, 2016 14:24:23 GMT
use findAllNoFindException() if don't want exception. Then use table.getn() to check the number
test1 = findAllNoFindException("target.png") if (table.getn(test1))==0 then
-- code
else
--code
end
|
|
|
Post by tribalwind on May 14, 2016 12:37:27 GMT
hello, please there is any way to exclude a region from a scan?
|
|
|
Post by AnkuLua on May 14, 2016 13:18:08 GMT
hello, please there is any way to exclude a region from a scan? Not for now. You can use findAll and then exclude the result of certain region(s).
|
|
|
Post by williamberg on May 22, 2016 22:57:52 GMT
Hi guys! How can I use this function "getDeviceID(), getIMEI(), getSIMSerial(), getIMSI(), getWiFiMAC()".
I'm try use: imei = getIMEI() this returns nil value.
|
|
|
Post by AnkuLua on May 23, 2016 0:19:15 GMT
Hi guys! How can I use this function "getDeviceID(), getIMEI(), getSIMSerial(), getIMSI(), getWiFiMAC()". I'm try use: imei = getIMEI() this returns nil value. IMEI only exists on device with mobile connection (2G, 3G and 4G). It may not exists on some tablets.
|
|
|
Post by williamberg on May 23, 2016 0:36:49 GMT
I'm test on my phone galaxy s5 with 4g and returns nil value, what are wrong?
|
|
|
Post by AnkuLua on May 23, 2016 10:25:47 GMT
I'm test on my phone galaxy s5 with 4g and returns nil value, what are wrong? Searching on google with "galaxy problem get IMEI" shows some clues. It seems galaxy's problem. Hope that helps.
|
|