If I copy the functionality of the other function into this other one, it still returns the same results in terms of the hNew handle object: Void Function FocusChangedEventEx (handle hNew, int iObject, int iChildNumber, handle hOld, int iOldObject, int iOldNumber, int iChangeDepth) var string sDesc let sDesc = "object name: " + GetObjectName (true, 0) SayString (sDesc) let sDesc = "window type: " + GetWindowType (hNew) Say (sDesc, OT_MESSAGE, false) EndFunction Just not sure if it has more to do with trying to assign other types to these objects or something, but, like said, jaws key + F1 seems to know what they are. Also haven't tested this on a normal windows app yet, so maybe that would be of interest. Stay well Jacob Kruger jacob.kruger@xxxxxxxxxxxx -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Homme, James Sent: Tuesday, August 25, 2009 1:13 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: Trying to use FocusChangedEvent to read some WPF controls etc. Hi, Have a look at FocusChangeEventX. I may not have spelled that correctly, but it's near FocusChangeEvent in the default script set. Jim ---------- Jim Homme Usability Services 412-544-1810 james.homme@xxxxxxxxxxxx "Strength does not come from physical capacity. It comes from an indomitable will." -- Mahatma Gandhi -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Jacob Kruger Sent: Tuesday, August 25, 2009 6:38 AM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Trying to use FocusChangedEvent to read some WPF controls etc. Working on testing/trying out some of my recent windows presentation foundation test applets, and after starting off making use of Jamal's SayTools to get it to tell me information about some of the specific control types using C# code, and a form of bubbling up onFocus event, but still having to really sort of custom code each control types information garnering bit of code, I am now trying out the following very simple bit of jaws scripting so far: Void Function FocusChangedEvent (handle hNew, handle hOld) var string sDesc let sDesc = "object name: " + GetObjectName (true, 0) SayString (sDesc) let sDesc = "window type: " + GetWindowType (hNew) Say (sDesc, OT_MESSAGE, false) EndFunction Firstly, when tabbing around a window with buttons and textboxes on it, it will tell me the object name of the control, but tells me it's an unknown window type every time. OTOH, if I hit jaws key + F1, it seems to know it's a button and must be pressed with spacebar etc. Now, when I test this same function on a window including a standard menu system, the FocusChangedEvent doesn't seem to get triggered at all, so I'm unable to even see if it's seeing the menu items at this stage, so I suppose I'll have to try hard code a bit of my own control interpretation for even menu systems for now, but just thought maybe someone would have a bit of an idea what else I could try aside from text searching etc., since it's more like I'm trying to find a sort of generic, reusable implementation of jaws scripting to help me test work I do in WPF etc. Lastly, also if I use the home ro utility, it doesn't seem to manage to 'see' much in these dialogues either. Stay well Jacob Kruger jacob.kruger@xxxxxxxxxxxx __________? Visit and contribute to The JAWS Script Repository http://jawsscripts.com View the list's information and change your settings at http://www.freelists.org/list/jawsscripts This e-mail and any attachments to it are confidential and are intended solely for use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this e-mail without the author's prior permission. The views expressed in this e-mail message do not necessarily represent the views of Highmark Inc., its subsidiaries, or affiliates. __________? Visit and contribute to The JAWS Script Repository http://jawsscripts.com View the list's information and change your settings at http://www.freelists.org/list/jawsscripts No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.66/2325 - Release Date: 08/25/09 06:08:00 __________ Visit and contribute to The JAWS Script Repository http://jawsscripts.com View the list's information and change your settings at http://www.freelists.org/list/jawsscripts