Automate Mouse Click

Martina

New member
Local time
Today, 17:55
Joined
Jul 26, 2006
Messages
6
I want to be able to automaticallly send a mouse click in response to a message using a Macro or VBA code. Is this possible, Any suggestions appreciated

thanks
 
I'm thinking that you have some sort of event code based on your mouse click and you want to duplicate it even when the mouse DOESN'T get clicked. You are thinking backwards, though.

If my take on your goal is correct, you do not fully understand the concept of an event in the "behind the scenes" context. An event is an interrupt in your program that depends on some deterministic OR NON-DETERMINISTIC (in the case of mouse click) event. There is a stored context related to the event to show what was interrupted. If you attempted to directly call the mouse click code from a non-event context, you might crash something.

So what you do instead is you decide what it is about that click routine that you want to do in non-event context. Separate that chunk out and make it a callable subroutine. Make the mouse-click event code call the subroutine. Then make this other code of interest ALSO call the same subroutine.

If this means that the mouse routine has to pass in coordinates, let it do so. That means the non-event caller must ALSO supply coordinates. How it decides what they should be? Your call, not mine.
 
timed message box

This thread will show you how to call a timed message box that closes after X seconds which will allow your code to continue. Remote shutdown of a shared DB
 

Users who are viewing this thread

Back
Top Bottom