|
Post by curval on Apr 20, 2016 21:39:04 GMT
Hi all, I'm currently writing my second script. The first one was simply pressing a key. It works on the first run. Picture was taken by the mobile build-in screen capture. 1. Question: You use PNG for the images. Does it mean its fully supported and I can use PNGs with transparency channel? (Find the banana) 2. Question: Now im trying my second script: while (true) do wait(3) testBraun = findAll("braun.png") for i, m in ipairs(testBraun) do click(m) end wait(1) testBlau = findAll("blau.png") for i, m in ipairs(testBlau) do click(m) end wait(1) testGelb = findAll("gelb.png") for i, m in ipairs(testGelb) do click(m) end wait(1) testRot = findAll("rot.png") for i, m in ipairs(testRot) do click(m) end endAnd it works! :-) ...until the third loop :-( Runtime error: com.appautomatic.anlulua.f: Can't find P(gelb.png) S: 0.7 stack traceback: [C]: in function'findAll' ?: in function 'findAll' /sdcard/AnkuLua/xxx/xxx.lua:25: in main chunkDoes it mean the source image was not found? (It exist) Or was no matching found? What can i do in that case? Some kind of exist or null check? BTW: It was inspired by ankulua.boards.net/thread/6/objects-methods-introduction-sikuli-compatible -- The first row in the first script after findAll contains an error ;-) Cheers Curval
|
|
|
Post by AnkuLua on Apr 25, 2016 10:25:13 GMT
1. No. You can't use transparency. 2. It means that the script can't find the image. You can use findAllNoFindException() in stead of findAll(). Then no exception will be raised. Do you want to share your script and help others? You can earn two pro versions. ankulua.boards.net/thread/56/give-away-version-promotion-codes
|
|
|
Post by nobody02 on May 21, 2016 16:17:47 GMT
Hi, and really a powerful app. I have a small problem. I tried to make a script yesterday (a simple script with clicl on picture in fact) and it worked good. But this morning, the script doesn't work anymore. It seems that the folder (where the pictures are) is not found even if it's on the same place as yesterday. Can you help me? ;-) Regards
|
|
|
Post by AnkuLua on May 22, 2016 0:01:57 GMT
Hi, and really a powerful app. I have a small problem. I tried to make a script yesterday (a simple script with clicl on picture in fact) and it worked good. But this morning, the script doesn't work anymore. It seems that the folder (where the pictures are) is not found even if it's on the same place as yesterday. Can you help me? ;-) Regards Experience for your reference. If you are using emulator, don't transfer script by sharing folder. Use sync me or email the zip file to yourself.
|
|
|
Post by nobody02 on May 22, 2016 10:13:51 GMT
No, I made it directly on my phone
|
|
|
Post by AnkuLua on May 22, 2016 10:46:16 GMT
No, I made it directly on my phone Is it root? Try to reboot your phone
|
|
|
Post by nobody02 on May 22, 2016 10:54:11 GMT
phone is rooted, and I already try to reboot without success. Is there a way to specify the direction folder? By default, pictures are in the "image" folder
|
|
Kako
Contributors
Posts: 105
|
Post by Kako on May 22, 2016 14:12:39 GMT
phone is rooted, and I already try to reboot without success. Is there a way to specify the direction folder? By default, pictures are in the "image" folder Yes, there is a way to specify the directory the images are in: setImagePath(String path)
|
|
|
Post by nobody02 on May 22, 2016 14:54:15 GMT
thanks, I will try this ;-)
|
|
|
Post by nobody02 on May 23, 2016 17:51:09 GMT
Hi, si Il tried this but it doesn't work. If you have an idea (^_-)
|
|
Kako
Contributors
Posts: 105
|
Post by Kako on May 23, 2016 21:15:46 GMT
Hi, si Il tried this but it doesn't work. If you have an idea (^_-) No, not really... Never had this kind of problem So, triple check if the image directory is there, relative to the script you are running and it's filled with your images. You could try to reinstall AnkuLua (this AnkuLua directory on your phone should remain even if AnkuLua gets removed)
|
|
|
Post by nobody02 on May 23, 2016 21:17:46 GMT
Re install, already done :-\
|
|
Kako
Contributors
Posts: 105
|
Post by Kako on May 23, 2016 21:38:44 GMT
You said you made it on the phone itself, right? If you try to hook your phone to a computer, are the files shown in the right directory?
|
|
|
Post by nobody02 on May 24, 2016 19:56:17 GMT
Yes, it is on the right place. Could you send me a real basic script that for example click on the playstore icon please ? To see if it is OK with a really proper script. My screen is 1920*1080. Thanks (^_-)
|
|
|
Post by nobody02 on May 24, 2016 22:10:34 GMT
I tested the calculator example. Nothing happen and I have this message :
Runtime error : com.appautomatic.ankulua.f: Can't find 6.png Stack traceback: (c): in function "click" ? : in function "click" /storage/sdcard0/AnKuLua/example1.lua: 7: in main chunck
|
|