Although in my other answer I mention that, ideally, you should just respond to clicks as clicks, there is one possibility that may work, depending on how the โsoftwareโ click is created.
I assume the Windows platform because of the "vb.net" tag:
Using WinAPI, you can send a message to any window to simulate, for example, the WM_LBUTTONDOWN event. In this message, you must indicate the location of the X and Y mouse at the moment you click the button - or where the receiving program is waiting. When you process the message, you can use the GetCursorPos call to get the actual cursor position. Make sure that the current position is close to that indicated in the message, and treat it like a click, otherwise ignore it.
Remember, however, that the nature of the message queue is such that it may take some time to process the event, and the mouse can go a long way in a short amount of time.
This solution will only work if a "click" is created by a simple Send / PostMessage. If the application that generates the click simulates mouse movement, then you should probably see other answers :)
icabod
source share