Q: How can I emulate mouse events in an application?

A:

There are two API fucntions that you can use:
<br>

'mouse_event()'.
'SendInput()'.