The Bytecode Club
[Help] Autoit and Genymotion - Printable Version

+- The Bytecode Club (https://the.bytecode.club)
+-- Forum: Lobby (https://the.bytecode.club/forumdisplay.php?fid=1)
+--- Forum: Game Cheating, Botting & Reverse Engineering (https://the.bytecode.club/forumdisplay.php?fid=97)
+--- Thread: [Help] Autoit and Genymotion (/showthread.php?tid=1260)



[Help] Autoit and Genymotion - Mody - 06-29-2015

I am not sure if that's the right section for this, but here we go.
I am trying to make a very simple bot using Autoit for a game which is only available for Android. So, I had to use Genymotion.
Everything works great with the window focused. I can get colors, perform a mouse click at any position, and use hotkeys.
The game has to be on top all the time though, and obviously I can't multitask while the bot is running, and it gets annoying to be honest.
So, I tried to make the bot works on minimized or in a background window, and I know both aren't the same. I found out there is no way to run the bot on a minimized window, it has to be in the background, which is ok, but unfortunately that doesn't work too.

Here is what I tried so far.

- Get a handle on the window, and use PixelGetColor(x, y, $handle), this doesn't work at all with Genymotion or any other type of application. Even with handle the window has to be focused all the time.

- Use FFSnapShot(), and FFGetPixel() which are functions in a library called FastFind, and it basically takes a screen to memory and then gets the color. This works on any type of application on background but doesn't work on Genymotion for some reason, and I have no idea why!

- When it all failed I simply tried taking a screen for Genymotion using a handle as well, it worked on any type of application, but when it comes to Genymotion it always capture a screen for the currently active window.

I could be wrong, but my guess is the whole issue can be fixed if I figured out why screen capturing doesn't work on Genymotion. Also I would like to know if there is another way to approach this problem.

I know it's off topic, but to keep track of health, I have to re get the address every time the game restarts, and manually adding it to the script. I have tried to get the pointer but it doesn't work on Genymotion.
I have only managed to get the address, and it doesn't even refresh unless I opened a menu in the game or something and close it.

I am terribly sorry for the long post, and thanks in advance.


RE: [Help] Autoit and Genymotion - Bibl - 07-01-2015

If you're running an android app, you can try asm-dex and edit the game files and then dump it back into an app file and then run it. http://asm.ow2.org/download/asmdex-index.html


RE: [Help] Autoit and Genymotion - Mody - 07-01-2015

(07-01-2015, 07:47 AM)Bibl Wrote:  If you're running an android app, you can try asm-dex and edit the game files and then dump it back into an app file and then run it. http://asm.ow2.org/download/asmdex-index.html

This looks interesting, I will take a look. Thanks.