Question

I am implementing a program in C# which can "Play" multiple instance of a game at the same time. The actions of the spawned instance is based on my actions. For example, when i click at position X, Y of the main instance, there will be mouse click at the same position in all other spawned instance.

I can do the mouse click, mouse down, mouse up by hooking the mouse event, and simulate the same mouse click on position based on the position of the each game window. However, this approach does not help if it comes to mouse dragging. And it has some setback in performance when i have to loop all my game instances to do a virtual mouse click.

I have found out that it is possible to create multiple mouse using the MultiPoint SDK from Microsoft. However, I could not find any documentation about if it is possible to simulate the multiple mouse click events (other than mine) in C#? If it is then how can i do it?

Thanks

Was it helpful?

Solution

Unless you are manipulating a program you didn't write, I think you might be using the wrong API for the job.

If you need to script multiple actions on multiple windows, you are probably better off running them sequentially. It will be easier to code and debug and you won't have to do anything special. Just script each action sequentially and then execute them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top