Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top