Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I simulate a Mouse Click in Mono (For Mac OS X)?

Thank you!
Posted
Comments
Sergey Alexandrovich Kryukov 12-Oct-15 15:34pm    
I guess, it can only be consistently simulated with native code, using P/Invoke. In Windows this is SendInput. Most likely, you will need to use MonobjC.
—SA

1 solution

Please see my comment to the question. Sorry that I don't know the complete answer, but I'll tell you where to look for. I used to use Mono on Mac OS X, and I know that Mono itself won't be enough. You need to get access to Mac OS X specific API, in particular, Cocoa. So, you will need Monobjc on top of Mono:
https://en.wikipedia.org/wiki/Monobjc[^],
http://www.monobjc.net/[^].

Note that you will have to start your Mono application not through Mono commands (Mono application_file_name), but through equivalent monobjc commands, which are exactly the same as in Mono.

See also: http://www.murgaa.com/mac-auto-mouse-click[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900