Article View: microsoft.public.vb.winapi
Article #11Re: mouse_event help needed
From: Mike Williams
Date: Mon, 06 Feb 2006 08:37
Date: Mon, 06 Feb 2006 08:37
35 lines
2935 bytes
2935 bytes
"bowchow79" <bowchow79@hotmail.com> wrote in message news:1139179439.013311.39470@f14g2000cwb.googlegroups.com... > This code works fine simulating a mouse click in every > other application I've tried. However, the one I'm > interested in does not respond - the window is brought > to the foreground and gains input focus, the mouse moves > to the desire location at which point the application changes > the cursor's icon, and nothing happens. It may be hiding itself from this sort of stuff in all sorts of complicated ways, or it may be doing something as simple as checking the time delay between the "received focus" and the "click", or perhaps also between the mousedown and the mouseup events in an attempt to discover whether the click is likely to have been produced by a human operator. The delay between mousedown and mouseup is typically in the region of 100 milliseconds or more for a human operator, and perhaps a second or more between focus and mousedown. Try introducing these delays in your code and see what happens. Mike This code > works in creating a mouse click for any other application I've tried. > > One thing to note about this application in which I'm trying to > simulate the click is that it does not have any child windows. There > are no buttons or forms whose hWnds I can grab. It appears to render > all buttons, scrollbars and such itself, without using Windows. I have > no clue why it doesn't seem to receive clicks - is there anything > anyone can think of that would explain this behavior? Hopefully I'm > just missing something about emulating mouse clicks in Windows. >
Technical Details
Message-ID:
<eJwRFivKGHA.2012@TK2MSFTNGP14.phx.gbl>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!newshub.sdsu.edu!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gblReferences:
<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 From: "Mike Williams" <Mike@WhiskyAndCoke.com> References: <1139179439.013311.39470@f14g2000cwb.googlegroups.com> Subject: Re: mouse_event help needed Date: Mon, 6 Feb 2006 08:37:14 -0000 Lines: 36 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Message-ID: <eJwRFivKGHA.2012@TK2MSFTNGP14.phx.gbl> Newsgroups: microsoft.public.vb.winapi,borland.public.delphi.winapi,microsoft.public.vb.general.discussion,microsoft.public.win32.programmer.ui,microsoft.public.dotnet.languages.csharp NNTP-Posting-Host: user-4905.lns3-c8.dsl.pol.co.uk 84.66.243.41 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!newshub.sdsu.edu!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl