🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: microsoft.public.vb.winapi
Article #13

Re: mouse_event help needed

#13
From: J French
Date: Mon, 06 Feb 2006 10:40
19 lines
2156 bytes
On 5 Feb 2006 14:43:59 -0800, "bowchow79" <bowchow79@hotmail.com>
wrote:

>I have an application for which I'd like to simulate mouse clicks.
>What I want to do is simulate a click at a specific location in the
>application.  I've tried PostMessage to no avail.  I had a bit more
>success with mouse_event, however even this doesn't seem to actually
>send a click in this application.  The code is roughly as
>follows (targetHwnd is the hWnd of the target window I'd like to click
>in, and targetX/targetY are the x/y coordinates on the screen I want to
>click at):

Are you absolutely sure that you have the right HWND ?

I would check that using WindowFromPoint

You could also try using Mouse_Event

SetCapture problems also spring to mind
Technical Details
Message-ID: <43e72713.72214757@news.btopenworld.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!news.uni-stuttgart.de!carbon.eu.sun.com!btnet-feed5!btnet!news.btopenworld.com!not-for-mail
References: <1139179439.013311.39470@f14g2000cwb.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 104093,7c284b3b127661a5
X-Google-Thread: 1091e5,7c284b3b127661a5
X-Google-Thread: 11493c,7c284b3b127661a5
X-Google-Thread: 110c1b,7c284b3b127661a5
X-Google-Thread: 10b845,7c284b3b127661a5
X-Google-Attributes: gid104093,gid1091e5,gid11493c,gid110c1b,gid10b845,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!news.uni-stuttgart.de!carbon.eu.sun.com!btnet-feed5!btnet!news.btopenworld.com!not-for-mail
From: erewhon@nowhere.uk (J French)
Newsgroups: microsoft.public.vb.winapi,borland.public.delphi.winapi,microsoft.public.vb.general.discussion,microsoft.public.win32.programmer.ui,microsoft.public.dotnet.languages.csharp
Subject: Re: mouse_event help needed
Date: Mon, 6 Feb 2006 10:40:44 +0000 (UTC)
Organization: BT Openworld
Lines: 19
Message-ID: <43e72713.72214757@news.btopenworld.com>
References: <1139179439.013311.39470@f14g2000cwb.googlegroups.com>
Reply-To: erewhon@nowhere.uk
NNTP-Posting-Host: host86-142-35-2.range86-142.btcentralplus.com
X-Trace: nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com 1139222444 20534 86.142.35.2 (6 Feb 2006 10:40:44 GMT)
X-Complaints-To: news-complaints@lists.btinternet.com
NNTP-Posting-Date: Mon, 6 Feb 2006 10:40:44 +0000 (UTC)
X-Newsreader: Forte Free Agent 1.1/32.230