|
Post by AnkuLua on Nov 5, 2015 17:01:44 GMT
Don't understand what you want to do. Anyway, use absolute file path. The following code works.file = io.open("/sdcard/log.lua", "a") file:write("print(1234)") file:close() dofile("/sdcard/log.lua")
|
|
|
Post by zpt on Nov 18, 2015 20:00:52 GMT
Is there any way to use Lua function type() (returns data type of argument) instead of Ankulua/Sikuli type()in AnkuLua script? Also may I suggest function like waitUserTap(seconds) which will wait for user's touch for x seconds and return it's location or false if no touch?
|
|
|
Post by AnkuLua on Nov 19, 2015 12:22:50 GMT
Is there any way to use Lua function type() (returns data type of argument) instead of Ankulua/Sikuli type()in AnkuLua script?
Unfortunately, you can't do it now. Why do you need it? Maybe we can do it in another way.
Also may I suggest function like waitUserTap(seconds) which will wait for user's touch for x seconds and return it's location or false if no touch?
No. The touch will be consumed by the running app. AnkuLua can not sense it.
|
|
|
Post by zpt on Nov 19, 2015 15:04:43 GMT
Why do you need it? Maybe we can do it in another way. Trying to transfer my overcomplicated Sikuli script with minimal changes, and it is written really bad =) Never mind, will just rework those part, it had to be done anyway.
|
|
|
Post by zpt on Dec 10, 2015 1:06:29 GMT
Getting "dynamic libraries not enabled; check your Lua installation" when implementing Socket module. Is there any way to install it, or any other way to get network functionality?
|
|
|
Post by AnkuLua on Dec 10, 2015 2:11:26 GMT
Getting "dynamic libraries not enabled; check your Lua installation" when implementing Socket module. Is there any way to install it, or any other way to get network functionality? What kind of network functionality do you want?
|
|
|
Post by zpt on Dec 10, 2015 2:25:52 GMT
What kind of network functionality do you want? I'm still learning about this. In fact, any way to exchange data with pc within a common LAN in both directions would be usefull. Alternatively, method to exchange data via USB would be suitable too, if it's easier to implement. P.S. device isn't rooted.
|
|
|
Post by AnkuLua on Dec 10, 2015 2:30:25 GMT
|
|
|
Post by zpt on Dec 10, 2015 2:43:43 GMT
Do you want to exchange data in script? Or just to exchange data for sync script and images between device and PC? I want to be able to send data from script to network port on pc for some program that listens it. And vice versa. I looked at an exchange option through file with automatic synchronization, but I'm looking for a faster and more convenient method.
|
|
|
Post by AnkuLua on Dec 10, 2015 3:05:07 GMT
Is something like ftp put work for you?
|
|
|
Post by zpt on Dec 10, 2015 3:15:58 GMT
I had not thought about FTP if you mean transferring by read/write file through it, will try, if it provides an acceptable speed and there is no alternatives.
|
|
|
Post by xabdullahx on Jan 18, 2016 22:53:36 GMT
What if the numbers are in different colors? It gives me -130198123 or something while the value is actually 303. Can i make it ignore color?
|
|
|
Post by AnkuLua on Jan 19, 2016 1:20:04 GMT
What if the numbers are in different colors? It gives me -130198123 or something while the value is actually 303. Can i make it ignore color? In fact, AnkuLua do image matching on grey images, like SikuliX. Normally, it comes from the region setting. Try to highlight the region before number OCR.
|
|
|
Post by lfec on Jan 19, 2016 10:05:18 GMT
In fact, AnkuLua do image matching on grey images, like SikuliX. Normally, it comes from the region setting. Try to highlight the region before number OCR. I have a situation where a button can be ENABLED or DISABLED, still being the same button, however with a shade of grey when disabled. I need a way to deal with it, something like, "wait enought time till your energy recharges" or something like that.
|
|
|
Post by zpt on Jan 19, 2016 14:19:48 GMT
I have a situation where a button can be ENABLED or DISABLED, still being the same button, however with a shade of grey when disabled. In the same case raising similarity requirement works for me, something like: button_on = Pattern("b_on.png"):similar(0.95) button_off = Pattern("b_off.png"):similar(0.95) With this Ankulua sees a slight change in shade.
|
|