Re: simulate mouse click - windows
- From: tmoran@xxxxxxx
- Date: Fri, 23 Dec 2005 00:07:49 -0600
>> 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,
.
- References:
- Re: simulate mouse click - windows
- From: Steve
- Re: simulate mouse click - windows
- Prev by Date: Re: simulate mouse click - windows
- Next by Date: Re: The GNU Ada compiler
- Previous by thread: Re: simulate mouse click - windows
- Next by thread: Re: simulate mouse click - windows
- Index(es):
Relevant Pages
|