Hi Jeff,
 
A hot key will not help you if you want to stop window eyes from
processing those keystrokes (whether you register a hot key or a cursor
key, I believe window eyes still gets to see it, along with any other
scripts which have used the same key).
 
I think you will have to use the new onCursorKey event, and determine if
each keystroke is one of the keys you're interested in, and if the
listbox has the focus.  this is exactly what I do in the MS Office
script, using the older events.
 
Chip
 
 




------------------------------

Chip Orange
Database Administrator
Florida Public Service Commission

chip.ora...@psc.state.fl.us
(850) 413-6314

 (Any opinions expressed are solely those of the author and do not
necessarily reflect those of the Florida Public Service Commission.)


 


________________________________

        From: Jeff Bishop [mailto:j...@jeffbishop.com] 
        Sent: Wednesday, July 08, 2009 2:01 PM
        To: gw-scripting@gwmicro.com
        Subject: Re: altering the speaking of arrowing through a listbox
...
        
        
        Yes, I need the keys to work normally outside of a listbox but
within the listbox I want to control the speech that is spoken when
arrowing. Registering them as CursorKeys will have the side affect of
already having had the application speak the text. I think the new event
is the way to go or a hotkey approach. I am still pondering this.
         
        Jeff
         

                ----- Original Message ----- 
                From: Chip Orange <mailto:cora...@psc.state.fl.us>  
                To: gw-scripting@gwmicro.com 
                Sent: Wednesday, July 08, 2009 10:40 AM
                Subject: RE: altering the speaking of arrowing through a
listbox ...

                Jeff,
                 
                I'm not sure what you meant by "i could", but if you
meant you could register them as cursor keys, then, you don't need the
new onCursorKey event to trap them; registering them as a cursor key,
you provide a routine to be called when each key is pressed.
                 
                If I recall, you're not guaranteed that your routine
will be called before or after window eyes has handled the key, and I
don't think you can stop window eyes from seeing it this way; however,
I've got one application where I just want to speak some additional
information when an arrow key is pressed, and I wanted window eyes to do
it's thing, and so this worked out fine for me.
                 
                Chip
                 
                 




                ------------------------------
                
                Chip Orange
                Database Administrator
                Florida Public Service Commission
                
                chip.ora...@psc.state.fl.us
                (850) 413-6314
                
                 (Any opinions expressed are solely those of the author
and do not necessarily reflect those of the Florida Public Service
Commission.)
                

                 


________________________________

                        From: Jeff Bishop [mailto:j...@jeffbishop.com] 
                        Sent: Wednesday, July 08, 2009 1:25 PM
                        To: gw-scripting@gwmicro.com
                        Subject: Re: altering the speaking of arrowing
through a listbox ...
                        
                        
                        I could yes, and then trap the events using the
new event? Kind of tricky :).
                         

                                ----- Original Message ----- 
                                From: Chip Orange
<mailto:cora...@psc.state.fl.us>  
                                To: gw-scripting@gwmicro.com 
                                Sent: Wednesday, July 08, 2009 10:22 AM
                                Subject: RE: altering the speaking of
arrowing through a listbox ...

                                Hi Jeff,
                                 
                                I do this same thing currently in the MS
Office VBA script, to cause it to speak the list box which displays
Intellisense information.
                                 
                                When I wrote it I used onKeyDown and
onKeyUp events for each key I was trapping; I needed to do this to keep
window eyes from seeing the keystrokes.
                                 
                                Now I'd use the newer onCursorKey event,
only because it seems to be designed exactly for this type of thing;
there could be some side effect of using onKeyDown and onKeyUp that I'm
not aware of.
                                 
                                If you don't need to hide these
keystrokes from window eyes, then couldn't you just register them as
cursor keys?
                                 
                                Chip
                                 
                                 




                                ------------------------------
                                
                                Chip Orange
                                Database Administrator
                                Florida Public Service Commission
                                
                                chip.ora...@psc.state.fl.us
                                (850) 413-6314
                                
                                 (Any opinions expressed are solely
those of the author and do not necessarily reflect those of the Florida
Public Service Commission.)
                                

                                 


________________________________

                                From: Jeff Bishop
[mailto:j...@jeffbishop.com] 
                                Sent: Wednesday, July 08, 2009 11:41 AM
                                To: gw-scripting@gwmicro.com
                                Subject: altering the speaking of
arrowing through a listbox ...
                                
                                
                                Hello,
                                 
                                OK, here is an interesting one.  What
scripting techniques would be best to alter the behavior of arrowing
through the contents of a listbox (up/down/home/end)?  It is unclear to
me what strategy would be best here:
                                 
                                1.  See if I can trap a MSAA event?  I
looked with WEEvent and I am not seeing events firing for this current
application.
                                 
                                2.  Use the new cursor handling logic?
This seems like it has the most promise?  GW, what do you think?
                                 
                                Any other suggestions are sincerely
appreciated.
                                 
                                Jeff
                                 

Reply via email to