I have written an application (wpf - will Mono translate this for a Mac?) that I wish to somehow port across to Mac OS X. This application involves using user32.dll to perform a mouse click (something like this):
[DllImport("user32.dll")]
static extern void mouse_event(int dwFlags, int dx, int dy, int dwData, int dwExtraInfo);
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
I have heard Mono is useful for making applications for multiple platforms - is there a way that I can use this to make my code compatible with a Mac?
If not, is there a way that I can invoke a mouse click using the Mac equivalent of user32.dll? And a way to detect whether the program is running in Windows or Mac OS to choose which bit of code to run?