Are there any ways to move mouse pointer to specific position?

I'm looking for the ways to move mouse pointer to specific position. But I have no idea to implement such a function.

And I've looked for many documents and Q&A but there's no way.

I want to move mouse pointer with like following code.
Code Block
function moveTo(x: Int, y: Int) {
...
}

Do you have any ideas?
Please tell me if you have!!


Hey,

a little late, but it might help someone:

CGDisplayMoveCursorToPoint(CGMainDisplayID(), CGPoint(x: x, y: y))
CGDisplayShowCursor(CGMainDisplayID())

Best regards, Robin11

Are there any ways to move mouse pointer to specific position?
 
 
Q