|
Post by MD. Mamun on Apr 16, 2019 3:50:14 GMT
Hi, is it possible to take/save a screenshot and and use it for matching the patterns in Ankulua?
I want to bot an online game where multiple matches appears in a window, when i click one of the matches - a popup window appears and i have to do some touches on that popup window - then the popup window closes automatically and returns to main window which remains same, I have to do the same thing for other matches too.
I have successfully done that but its speed is not fast enough as i want, it takes 3-4 seconds to perform each match and click. It's faster when i use "usePreviousSnap(true) function" but it doesn't do anything to that popup window as it use the main window screenshot to find the patterns of popup window.
So i want to-Take a screenshot of that main window and save it in my file system then use it to search for patterns when popup window disappears.
Appreciate any kind of help or advice, Thank you.
|
|
|
Post by AnkuLua on Apr 16, 2019 6:34:29 GMT
Do you consider doing all the search on the main window at once before going to the match? Then you can use the searching result directly once back from the match.
|
|
|
Post by MD. Mamun on Apr 16, 2019 8:58:20 GMT
Hi Admin, thanks for the reply!
Are you saying that I can save/keep the total search result of main window and use it to match when i get back from popup window?
|
|
|
Post by AnkuLua on Apr 16, 2019 9:00:39 GMT
Hi Admin, thanks for the reply! Are you saying that I can save/keep the total search result of main window and use it to match when i get back from popup window? Yes.
|
|
|
Post by MD. Mamun on Apr 16, 2019 9:14:09 GMT
what function should I use to accomplish that?
|
|
|
Post by AnkuLua on Apr 16, 2019 12:08:54 GMT
what function should I use to accomplish that? You need to achieve through script, no special function. Search what you want and store the result to variables. You can provide some screenshots and tell us what you want to do.
|
|
|
Post by MD. Mamun on Apr 16, 2019 12:51:58 GMT
It's that shop function from supercell's HayDay game. I tried haybot from mercobots but unfortunately that bot did not work well at my device for having some resulation issues, so I started to developing my own. The post is about botting the wheat selling actions at road side shop..
when the bot detects a sold or empty box the bot tap it and then- the storage POPUP appears, it find the wheat from that popup and put that up for sale- Popup closes automatically and bot look for next sold or empty box.. there is 10 boxes per window and i'm using a loop with multiple region to make it work. i used usePreviousSnap(true) function if the bot can not find any match so it goes to the matcing results fast but then i had to set usePreviousSnap() as false so it can detect the location of wheat from that Popup window, hence it goes slow because the bot has to take the screenshot of main window again.
can i have the structure of usePreviousSnap() function please? i mean it uses a saved(temporarily) screenshot to match patterns, maybe we can replace or modify the location by using an argument?
I like the idea of putting the search result into variables or may be an array but i as i use multiple regions to search for patterns - it might get overcomplicated..
|
|