Will you implement Mouse simulation as well?

Feb 20, 2010 at 7:45 AM

This library is amazing and you are the only person out there who is building a full .NET wrapper around the SendInput function.

I was wondering if you are planning on implementing functions for simulating Mouse movement and clicks/double-clicks etc.?  It looks like you were on the way to implementing it from the looks of the source code.  Thanks

Coordinator
Feb 21, 2010 at 9:56 PM

Thanks for the positive feedback.  I vaguely remember adding a comment that I could extend the support to include mouse events.  I haven't had a need to do it at this point and if I'm honest with myself I won't get to it for a couple of months due to involvement in some other projects.  I figure the work I'd done to this point would be pretty helpful since as you also found there is very little on the interwebs of this nature.  If you'd like to jump on board and and implement the mouse simulation functionality feel free to contribute!  :)

Feb 22, 2010 at 7:16 AM
Edited Feb 22, 2010 at 7:20 AM

Michael,

Hi, I've actually started doing that.  So far I've implemented mouse movement, left button down, left button up, left click, right button down, right button up, right click, double-click, and scroll.  I've verified everything working except scroll.  Honestly it was fairly straightforward to do since you had already created the MouseFlag class and it had extensive comments on how to use it.
I would be more than happy to merge those additions into the project if you are open to that.  I have not contributed on a CodePlex project before so I am not sure how the process works.  Let me know if you are interested,
Arash Emami
Mar 6, 2010 at 8:36 PM

I implemented the mouse move too because I need it for one application that I'm writing.

Wondering if we can have the same naming convention

 

Coordinator
Mar 7, 2010 at 10:46 PM

Hi Guys,

Possibly the easiest way to contribute your code would be to upload the files as a patch and I'll merge the changes in after I test them.

Thanks!
Mike

Mar 8, 2010 at 6:52 PM

Hi Michael,

I added mouse simulation, and uploaded the patch to you.  I also moved the keyboard simulation functions into their own class (KeyboardSimulator) and folder.

Arash

Mar 16, 2010 at 11:05 PM

Hi guys,

I'm also interested in the mouse extensions.

@michaelnoonan: Will you be able to publish the new version any time soon?

@aemami99: Alternatively, would you be willing to share your version?

Thx!

Martin

Coordinator
Mar 17, 2010 at 12:18 AM

Hi All,

Sorry about the slow responses so far.  I've been overrun with project work at the moment.  I've downloaded the patch Arash sent through and am spending a couple of hours today to test and refactor it a little bit.  On the whole I think Arash has added some nice improvements!  Thanks!

I'll post the new release version of the binaries and source code by Friday morning, AEST - yep, I'm in Aussie.  :)

Cheers,
Mike

Coordinator
Mar 22, 2010 at 10:52 AM

Hey All,

Just a quick note to let you know I'm not letting this work go stale.  I'm currently working with the patch that Arash sent through and implementing some extra features around testability of the InputSimulator and providing for using a mock InputSimulator as a test harness for your applications.

Cheers,
Mike 

Mar 23, 2010 at 10:23 PM

Mike,

thanks for the update, sounds great, I am looking forward to it! Btw, since you are making use of the win32 API, I was wondering if this will still work in Windows 7 (32 bit / 64 bit)? Any idea?

Thanks much!

Martin

Mar 23, 2010 at 11:04 PM
It most definitely works on Windows 7.



Coordinator
Apr 7, 2010 at 4:07 AM

Hey All,

Still working on the next version as we speak. Just wanted to let you know I'm still going on it and am hoping to get a first cut of the new code-base up to the codeplex source control tonight provided I get something useful done on the train today...  :)

Mike

Aug 1, 2010 at 10:00 PM

Hi all,

Great work on this  -  was just using the System.Windows.Forms.SendKeys until now so thanks for sharing!

 

Any update on the Mouse?? Am keen to use the functionality in a project.

 

Regards

 
Coordinator
Aug 1, 2010 at 10:14 PM
Hi Saracen,

Take a look at the in-development build for 0.2.0.0 and see if it all works well for you.  This includes mouse simulation as well.

Mike

On Mon, Aug 2, 2010 at 8:01 AM, saracen9 <notifications@codeplex.com> wrote:

From: saracen9

Hi all,

Great work on this  -  was just using the System.Windows.Forms.SendKeys until now so thanks for sharing!

 

Any update on the Mouse?? Am keen to use the functionality in a project.

 

Regards

 

Read the full discussion online.

To add a post to this discussion, reply to this email (inputsimulator@discussions.codeplex.com)

To start a new discussion for this project, email inputsimulator@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Aug 2, 2010 at 8:08 PM

Thanks for the advice michael,

downloaded and built the .dll from the source but when I try using either of the "MoveMouse" methods it just defaults to the top left of the screen, no matter what co-ords i give it... any ideas?

Coordinator
Aug 2, 2010 at 11:15 PM
Hi Saracen,

From the best of my knowledge the functionality works ok.  One of the tricks is that the position you want to move the mouse to is not a pixel position from the 0,0 position on your screen.  It is a normalised value which can represent either a relative or absolute movement as described here.  It gets even more tricky when dealing with multiple monitors...

If you take a look at the integration tests in the 0.2.0.0 interim build it has some mouse movement tests in it.

Hope this helps!  Let me know if it still doesn't seem to work right and send me a sample project if possible.
Mike

On Tue, Aug 3, 2010 at 6:08 AM, saracen9 <notifications@codeplex.com> wrote:

From: saracen9

Thanks for the advice michael,

downloaded and built the .dll from the source but when I try using either of the "MoveMouse" methods it just defaults to the top left of the screen, no matter what co-ords i give it... any ideas?

Read the full discussion online.

To add a post to this discussion, reply to this email (inputsimulator@discussions.codeplex.com)

To start a new discussion for this project, email inputsimulator@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Dec 12, 2010 at 8:51 AM

Hi, Michael

 

I've looked for 0.2.0.0 build with no luck. Hope you can provide extra info on where to get it.

 

Thanx

Jan 22, 2013 at 6:26 PM

To help with converting to the absolute point value from the x/y coords. Here's some methods:

private double convertXToAbsolute(int x)
{
     return ((double)65535 * x) / (double)Screen.PrimaryScreen.Bounds.Width;
}

private double convertYToAbsolute(int y)
{
     return ((double)65535 * y) / (double)Screen.PrimaryScreen.Bounds.Height;
}

 

Mar 16, 2014 at 12:27 PM
Edited Mar 16, 2014 at 2:45 PM
phonzie, what is that code supposed to do? What is x?

@ Michael,
this library is very useful to me, thank you very much. It only took me a while to figure out, that the download is completely outdated (when seaching for mouse functionality). I'd suggest also to release the newer version as a download.