Jamal Mazrui wrote:
Suppose oWindow is a Window object for the window to be clicked. The
Windows API technique might be as follows:
Const BM_CLICK = 245
oWindow.SendMessage BM_CLICK, 0
I think there's a zero missing there.
What it really all comes down to is this: every window will respond
correctly if you actually move the mouse to it and click the button.
Some windows will respond correctly if you just send them an appropriate
WM_LBUTTONDOWN/WM_LBUTTONUP pair, and some will respond correctly to
higher-level messages like BM_CLICK (though if they're really buttons,
you can do Window.Control.Click, which is even easier.) It all depends
on the window.