Is it possible to simulate user input? And how can I realize this?

I need to automate user interaction with an windows application. The problem is, that this application doesn't provide an API for one special function I need to call. But this function is accessible in the application window by standard mouse input.

I am not tied to any programming language. I only need to write an application which does the same, like I do with my computer mouse input.