From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,501f57fc0d7fea05 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 23 Dec 2005 00:07:49 -0600 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: simulate mouse click - windows References: X-Newsreader: Tom's custom newsreader Message-ID: Date: Fri, 23 Dec 2005 00:07:49 -0600 NNTP-Posting-Host: 67.169.16.9 X-Trace: sv3-DMjvQh1nRlIAzWjHD9r4iZA1opWSCN7qVePwuzfu5fa8anwworNy5tWFuccJtytVF0MsR0/ygLiM9iM!SLrtJ+QdxIDtisrxmEmW+oAZdEy2YDj8ESmoCOKbxu7jEGK+gigv8dV5Z508QWPGTlqlbwF50Ww= X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:6981 Date: 2005-12-23T00:07:49-06:00 List-Id: >> 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,