[jawsscripts] Re: Winclick: was Re: Control Left Mouse Clicks

  • From: "Dennis Brown" <DennisTBrown@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Tue, 21 Oct 2014 14:14:06 -0400

When using a window with lots of items that are not in individual control id 
or windows, can you try the function we created for Windows Live Messenger: 
GetObjectInfoByName?
If the name is static?
Thanks,
Dennis Brown

----- Original Message ----- 
From: "Jim Bauer" <holdsworthfan@xxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Monday, October 20, 2014 11:07 PM
Subject: [jawsscripts] Re: Winclick: was Re: Control Left Mouse Clicks


>I got this off-list.
>
>
> -------- Original Message --------
> Subject: Re: Winclick: was Re: [jawsscripts] Control Left Mouse Clicks
> Date: Mon, 20 Oct 2014 21:13:35 -0500
> From: Jim Snowbarger <Snowman@xxxxxxxxxxxxxxxx>
> Reply-To: Jim Snowbarger <Snowman@xxxxxxxxxxxxxxxx>
> To: Jim Bauer <holdsworthfan@xxxxxx>
>
> Thanks for this, Jim, and thanks, Doug.
>
> I got this to work, but I'm not convinced it is working correctly.  My
> derived code is shown below.  The WParam variable contains bits for the
> modifier keys.  Unfortunately, the function does a shift click, or a
> straight click, strictly based on the physical modifier key, and seems to
> completely ignore the shift bit in WParam.  It doesn't matter if it is set
> or not.
>
> Also, if you don't hover the mouse over the location, no click occurs 
> there.
> So, the blending of coordinates into the LParam variable seems to have no
> effect at all.
>
> So, at this point, the result is essentially the same as though you took 
> the
> jaws cursor there and did a LeftMouseButton() call.
>
> The situation is a small area inside a large window, that does not have 
> it's
> own object.  It is one big window with a bunch of stuff, and this little 
> bar
> inside it contains several clickable controls, none of which has it's own
> MSAA object.  I'm not smart enough about UIA yet to know if that would be
> any different.
>
> Mousey code follows.  Suggestions welcome.
>
> function ClickByMessage(int x, int y)
> ; parameters:
> ;    x = pixels from left side of window for this control
> ;    y = pixels up from the bottom of the window for this control
> ; *** local declarations mercifully omitted
>
> Let hFocus = GetFocus()
> SaveCursor()
> JawsCursor()
> let msgDown = 0x0201  ; WM_LBUTTONDOWN
> let msgUp = 0x0202  ; WM_LBUTTONUP
> Let o = getObjectFromEvent (hFocus,-4,0,0)
> ; get the boundaries of this rectangle
> o.accLocation(intref(l),intref(t),intref(w),intref(h), 0)
> ; put the mouse there
> MoveTo (l+x, (t+h-y))
> ; because the caller's y is referenced to the bottom of the window
> ; but Windows wants it relative to the top.
> Let y = h - y
> Let WParam = 1 ; left button
> ; note: does not matter whether we add 4 for the shift modifier
> ; instead, it tracks the physical modifier key
> Let LParam = MakeLong (x, y) ; also does nothing
> postMessage (hFocus, msgDown, wParam, lParam)
> postMessage (hFocus, msgUp, 0, lParam)
> RestoreCursor()
> EndFunction
>
>
> ----- Original Message ----- 
> From: "Jim Bauer" <holdsworthfan@xxxxxx>
> To: "Jim Snowbarger" <Snowman@xxxxxxxxxxxxxxxx>
> Sent: Friday, October 17, 2014 9:48 AM
> Subject: Winclick: was Re: [jawsscripts] Control Left Mouse Clicks
>
>
> Doug's Winclick module is attached, pulled right out of BX.
>
> hth
> On 10/16/2014 10:07 PM, Jim Snowbarger wrote:
>> Hey guys,
>> I have this script that is doing things in response to key combinations
>> like
>> control+LeftArrow.  Part of the processing for that was to do a left 
>> mouse
>> click at a location.  But, since the control key is still down when the
>> script runs, it is also down when jaws does the leftMouseButton call.
>> Problem is that the application is sometimes getting a control left 
>> click,
>> instead of a straight left click.
>> If I wait for the control key to be released first, the interface is
>> clunky,
>> but the problem goes away.
>> Is there a better way to send a mouse click to that window that might
>> obviate the confusion?
>> I'm thinkin of a SendMessage or PostMessage call.  But, I don't know 
>> where
>> to find what message to send.
>> Thanks heaps for any help you can give.
>>
>>
>> __________�
>>
>> View the list's information and change your settings at
>> http://www.freelists.org/list/jawsscripts
>>
>
>
>
>
>
> __________�
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
> 

__________�

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: