1

I have founds some resource like this dealing with the subject of attaining multiple cursors on windows for more than one mouse attached to the system. My requirement is a little simpler but I need some inputs on it.

1) What I want is to invoke an application (lets say IE) and do mouse activity(hovering , clicking etc) on it. All of this while there should be no disturbance to the system cursor , which should be free to be used by the user of the desktop.

2)I understand that this can not be done using the windows cursor apis as the documentation always mentions "the cursor" and there is no concept of multiple cursors inbuilt.

3)

  • This leaves me to drawing a cursor on the target window. A bitmap perhaps and to move it randomly? What APIs will be of use here?
    • How do I simulate the visual effects that are actually done my actual cursor movement. Do I need to send messages to the target
      window like WM_MOUSEMOVE , WM_SETCURSOR etc.?
    • Does sending mouse messages to the other window interfere with the mouse activities that the user is involved in currently? The
      intention is not to disturb the user while the application runs.

Thanks for your inputs.

Community
  • 1
  • 1
user1624807
  • 271
  • 1
  • 5
  • 20
  • Internet Explorer has an [automation interface](http://msdn.microsoft.com/en-us/library/hh995096.aspx), like many other applications. Investigate, whether the application you want to automate offers an interface. Faking input is the route of pain. – IInspectable May 29 '14 at 16:17
  • I am already using certain automation libraries(watIN for .NET) that are doing the job of mouse click and all. I want to make the visual simulation of mouse move on top of this. – user1624807 May 29 '14 at 16:20

1 Answers1

0

Create a separate window for each extra mouse that is installed, and put an image of the desired cursor in each window. Then use the Raw Input API to monitor activity on the extra mouses and move your windows around as needed, and use mouse_event() or SendInput() to send out your own mouse events (movements, clicks, etc) as needed.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770