Question

I'm having a hard time figuring out how to simulate mouse clicks and such in a window that is minimized or not currently active. In case it's not clear, I want my mouse to be able to click and stuff without actually using the mouse.

For example, while I'm browsing the web I would like my program to be able to be clicking inside of another application at the same time.

How can I accomplish this? All I can find is the same old movemouse and setcursorpos stuff... as we know that requires the use of your actual mouse/Cursor.

Was it helpful?

Solution

You are looking to automate applications. This is done not by faking input but by using an automation API. These days, the preferred one is UI Automation. This is perfectly accessible from Delphi: How to use MS UI Automation in Delphi 2009.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top