Thanks, BrowserUK.

I am trying your approach, but every little thing that is done in Windows produces an overwhelming flood of messages,so it's hard to sort the wheat from the chaff. Here is a sequence:

<00010> 0003009C P WM_MOUSEMOVE fwKeys:0000 xPos:67 yPos:7 <00011> 0003009C P WM_MOUSEMOVE fwKeys:0000 xPos:47 yPos:5 <00012> 0003009A S WM_PARENTNOTIFY fwEvent:WM_LBUTTONDOWN xPos:87 yPos +:8 <00013> 0003009A R WM_PARENTNOTIFY <00014> 00030098 S WM_PARENTNOTIFY fwEvent:WM_LBUTTONDOWN xPos:92 yPos +:13 <00015> 00030098 R WM_PARENTNOTIFY <00016> 000200AE S WM_PARENTNOTIFY fwEvent:WM_LBUTTONDOWN xPos:92 yPos +:13 <00017> 000200AE R WM_PARENTNOTIFY <00018> 00030096 S WM_PARENTNOTIFY fwEvent:WM_LBUTTONDOWN xPos:92 yPos +:13 <00019> 00030096 R WM_PARENTNOTIFY <00020> 0003009C S WM_MOUSEACTIVATE hwndTopLevel:00030096 nHittest:HTC +LIENT uMsg:WM_LBUTTONDOWN <00021> 0003009A S .WM_MOUSEACTIVATE hwndTopLevel:00030096 nHittest:HT +CLIENT uMsg:WM_LBUTTONDOWN <00022> 00030098 S ..WM_MOUSEACTIVATE hwndTopLevel:00030096 nHittest:H +TCLIENT uMsg:WM_LBUTTONDOWN <00023> 000200AE S ...WM_MOUSEACTIVATE hwndTopLevel:00030096 nHittest: +HTCLIENT uMsg:WM_LBUTTONDOWN <00024> 00030096 S ....WM_MOUSEACTIVATE hwndTopLevel:00030096 nHittest +:HTCLIENT uMsg:WM_LBUTTONDOWN <00025> 00030096 R ....WM_MOUSEACTIVATE fuActivate:MA_NOACTIVATE <00026> 000200AE R ...WM_MOUSEACTIVATE fuActivate:MA_NOACTIVATE <00027> 00030098 R ..WM_MOUSEACTIVATE fuActivate:MA_NOACTIVATE <00028> 0003009A R .WM_MOUSEACTIVATE fuActivate:MA_NOACTIVATE <00029> 0003009C R WM_MOUSEACTIVATE fuActivate:MA_NOACTIVATE <00030> 0003009C P WM_LBUTTONDOWN fwKeys:MK_LBUTTON xPos:47 yPos:5 <00031> 00030096 S WM_WINDOWPOSCHANGING lpwp:0140FCC0 <00032> 00030096 R WM_WINDOWPOSCHANGING <00033> 00030096 S WM_WINDOWPOSCHANGED lpwp:0140FCC0 <00034> 000200AE S .WM_WINDOWPOSCHANGING lpwp:0140FBA0 <00035> 000200AE R .WM_WINDOWPOSCHANGING <00036> 00030096 R WM_WINDOWPOSCHANGED <00037> 00030096 S WM_ACTIVATEAPP fActive:True dwThreadID:00000000 <00038> 00030096 R WM_ACTIVATEAPP <00039> 00030096 S WM_NCACTIVATE fActive:True <00040> 00030096 R WM_NCACTIVATE <00041> 00030096 S WM_ACTIVATE fActive:WA_ACTIVE fMinimized:False hwnd +Previous:(null) <00042> 00030096 S .WM_SETFOCUS hwndLoseFocus:(null) <00043> 00030096 S ..WM_KILLFOCUS hwndGetFocus:000200AE <00044> 00030096 R ..WM_KILLFOCUS <00045> 000200AE S ..WM_SETFOCUS hwndLoseFocus:00030096 <00046> 000200AE R ..WM_SETFOCUS <00047> 00030096 R .WM_SETFOCUS <00048> 00030096 R WM_ACTIVATE <00049> 000200AE S WM_KILLFOCUS hwndGetFocus:000200AE <00050> 000200AE R WM_KILLFOCUS <00051> 000200AE S WM_SETFOCUS hwndLoseFocus:000200AE <00052> 000200AE R WM_SETFOCUS <00053> 0003009C P WM_MOUSEMOVE fwKeys:MK_LBUTTON xPos:47 yPos:5 <00054> 0003009C P WM_MOUSEMOVE fwKeys:MK_LBUTTON xPos:47 yPos:5 <00055> 0003009C P WM_MOUSEMOVE fwKeys:MK_LBUTTON xPos:47 yPos:5 <00056> 0003009C P WM_MOUSEMOVE fwKeys:MK_LBUTTON xPos:47 yPos:5 <00057> 0003009C P WM_MOUSEMOVE fwKeys:MK_LBUTTON xPos:47 yPos:5 <00058> 0003009C P WM_MOUSEMOVE fwKeys:MK_LBUTTON xPos:47 yPos:5 <00059> 0003009C P WM_LBUTTONUP fwKeys:0000 xPos:47 yPos:5 <00060> 0003009C S WM_CAPTURECHANGED hwndNewCapture:00000000 <00061> 0003009C R WM_CAPTURECHANGED <00062> 0003009C P WM_MOUSEMOVE fwKeys:0000 xPos:47 yPos:5 <00063> 0003009C S WM_WINDOWPOSCHANGING lpwp:0140F880 <00064> 0003009C R WM_WINDOWPOSCHANGING
What it looks like to me is that there is a cascade of WM_PARENTNOTIFY messages from the lowest child up the parent tree. Then there is a cascade of WM_MOUSEACTIVATE messages up the tree (each returning a MA_NOACTIVATE). I don't think the WM_WINDOWPOSCHANGING messages matter, but the WM_ACTIVATEAPP and WM_SETFOCUS messages at the top level probably do.

Pretty messy, but I'll keep working on it.


In reply to Re: Re: Simulating mouse clicks in Windows by tall_man
in thread Simulating mouse clicks in Windows by tall_man

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.