Mouseclick
Benji York
benji at benjiyork.com
Mon May 2 17:04:26 EDT 2005
Terje Johan Abrahamsen wrote:
> I have been trying desperately for a while to make Python push the
> left mousebutton.
Here's some code I've used to simulate a *right* click, but it should
be obvious how to make it do what you want:
void sendRightClick(void)
{
PostMessage(GetForegroundWindow(), WM_RBUTTONDOWN, MK_RBUTTON, 0);
PostMessage(GetForegroundWindow(), WM_RBUTTONUP, 0, 0);
}
--
Benji York
More information about the Python-list
mailing list