Mouse Control API

I’d like to develop an app similar to Keyboard maestro which is able to see the screen of the Mac and control the mouse to click on certain areas. Basically, i would like the app to be able to click at an x,y coordinate. I’m assuming this would get rejected by the App Store. Am I correct? As a workaround, if I required the user to enable screen sharing and did my automation through that, would that also cause me to get rejected? I seem to remember using any technique to circumvent App Store rules also is grounds for rejection. Advice?

You can control mouse position programmatically and "legally":

h ttps://developer.apple.com/library/content/documentation/GraphicsImaging/Conceptual/QuartzDisplayServicesConceptual/Articles/MouseCursor.html


Note that you can move the mouse without moving the cursor, which may be useful in your case.


Look here for generating mouse click

ttps://stackoverflow.com/questions/12123150/how-to-programmatically-simulate-a-mouse-click-without-moving-mouse-in-cocoa


So you could have an option :

- move mouse without moving cursor to your position

- generate click

- return mouse to original position.


Feed back if you make it work.

https://developer.apple.com/documentation/appkit/mouse_keyboard_and_trackpad

https://developer.apple.com/documentation/coregraphics/cgevent

Both contain useful info pertaining to generating, and responding to, mouse and keyboard events

Mouse Control API
 
 
Q