1

I'm researching this topic for a while, but didn't find any answer. I want to build a bot, for a specific game on bluestacks or any other Android emulator. But this bot should be ably to interact with the Emulator even, if the window is not in the foreground of your Screen. Also it should use a "ghost" mouse, a mouse which is not used and visible to the user. The bot shouldn't use the "user" mouse, the which the user uses and sees.

I'm hoping for a class or an explanation, how this could work and will work.

Thank you in advance!

alexanders916
  • 157
  • 1
  • 16
  • Like with any other application, you can use Windows APIs to send click events to the application. The more complicated part will be to analyze where you want to click, unless it's always a fixed position. But clicking alone can be easily achieved. See here [link](http://stackoverflow.com/questions/10355286/programmatically-mouse-click-in-another-window) – SharpShade Oct 02 '16 at 15:12
  • @SharpShade I know where I want to click in the window. I noted down where I have to click (xPosition and yPosition) – alexanders916 Oct 02 '16 at 16:42
  • Your answer doesn't work when the window is in background. – alexanders916 Oct 06 '16 at 16:31
  • Well, you should improve your Google skills, sir. [Link One](http://stackoverflow.com/questions/10279812/simulate-click-into-a-hidden-window) [Link Two](http://stackoverflow.com/questions/5094398/how-to-programatically-mouse-move-click-right-click-and-keypress-etc-in-winfor) - you should be able to get this working. Moreover I do believe that it does work with background windows - maybe you're doing it wrong. – SharpShade Oct 07 '16 at 09:25
  • @SharpShade Link One: The answer is written in C++, I don't know anything about it, Link Two: The answer isn't the answer for my question – alexanders916 Oct 08 '16 at 11:57
  • Then you should start learning how to convert such a snippet into C#. It's not that difficult, give it a try. The methods like "FindWindow" are native windows API functions which you will be able to implement with [Pinvoke.Net](http://www.pinvoke.net/). Everything else can be copied basically since it's mostly identical syntax. Else just google what's the contrary class/syntax in C#. – SharpShade Oct 11 '16 at 10:26

0 Answers0