From: tmoran@acm.org
Subject: Re: simulate mouse click - windows
Date: Fri, 23 Dec 2005 00:07:49 -0600
Date: 2005-12-23T00:07:49-06:00 [thread overview]
Message-ID: <nvadnV2z44CoCTbeRVn-qw@comcast.com> (raw)
In-Reply-To: X-idnehr6Pkp-DbenZ2dnUVZ_sCdnZ2d@comcast.com
>> How could I simulate clicks?
>If the you want the device to appear as a mouse to window, you'll need to
>look into writing device drivers.
That's surely the Right Way. IIRC there's a function "mouse_event"
to which you can pass position and action. There may be gotchas about
type Mouse_Actions is new Dword;
MOUSEEVENTF_MOVE : constant Mouse_Actions := 16#0001#; -- mouse move
MOUSEEVENTF_LEFTDOWN : constant Mouse_Actions := 16#0002#; -- left button down
MOUSEEVENTF_LEFTUP : constant Mouse_Actions := 16#0004#; -- left button up
MOUSEEVENTF_RIGHTDOWN : constant Mouse_Actions := 16#0008#; -- right button down
MOUSEEVENTF_RIGHTUP : constant Mouse_Actions := 16#0010#; -- right button up
MOUSEEVENTF_MIDDLEDOWN : constant Mouse_Actions := 16#0020#; -- middle button down
MOUSEEVENTF_MIDDLEUP : constant Mouse_Actions := 16#0040#; -- middle button up
MOUSEEVENTF_WHEEL : constant Mouse_Actions := 16#0800#; -- wheel button rolled
MOUSEEVENTF_ABSOLUTE : constant Mouse_Actions := 16#8000#; -- absolute move
procedure mouse_event(Action : in Mouse_Actions;
Dx, Dy : in Dword;
Data : in Dword;
Extra_Info : in Dword);
pragma Import(StdCall, mouse_event, "mouse_event");
That may be obsolete, and I don't recall what the requirements are on
who owns what window,
next prev parent reply other threads:[~2005-12-23 6:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-23 1:47 simulate mouse click - windows Gutek
2005-12-23 2:51 ` Steve
2005-12-23 6:07 ` tmoran [this message]
2005-12-23 11:13 ` bubble
2005-12-23 12:47 ` Adrien Plisson
2005-12-24 1:54 ` Gutek
2005-12-24 2:59 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox