This is interesting and useful information Thanks for posting it. As power users of JLS_Utilities know, I have been using GetScriptCallStack when I want to know how I got to where I am. That also gives you the parameters of each call along the way. I have a utility that dumps that into a buffer I can browse at leasure, with the option to ignore the tedious business of long convoluted jsb path names. But, this will help trap those things that don't appear in your call chain. I would probably use this to compile a buffer, which I would then go dig through after the fact. Better, than tons of involuntary speech. <grin> Shut up, shut up, please shut up! ----- Original Message ----- From: "Doug Lee" <doug.lee@xxxxxxxxxxxxxxxx> To: <jawsscripts@xxxxxxxxxxxxx> Sent: Friday, November 01, 2013 9:08 AM Subject: [jawsscripts] New way to trace events and callbacks starting in JAWS 14 Sort of a public service post here... findings I made in the last two days in JAWS 14, also applying to JAWS 15. There is a new way to trace events, or more generally, functions called directly from JAWS. This includes events, Braille callbacks like BrailleAddObject*, and functions called by JAWS because of a scheduleFunction call. Only functions with actual code to run show up here; e.g., if a WindowActivatedEvent fires or you say scheduleFunction("xyz", 5) but no windowActivatedEvent or xyz() function exists, the below trick will not see that call attempt. (There's a WindowActivatedEvent in default.jss though, so that one at least will appear.) How to do this: addHook(HK_Event_Trace, "myTracer") ; myTracer() will get called just before each function JAWS itself calls that exists... removeHook(HK_Event_Trace, "myTracer") ; But not anymore. ; HK_Event_Trace is defined in HJConst.jsh. void function myTracer(string jsbPath, string funcName, ...) ; "..." above can be whatever you like; see below. endFunction What is passed to the trace function: First the full path to the jsb file that contains the function that is about to execute. Second, the name of the function about to be called. Then all the parameters that are going to be passed to that function. Sadly, we have no way in JAWS scripting to detect with absolute certainty the count or types of these parameters, but we can still do stuff like this: void function myTracer(string jsbPath, string funcName, handle hwnd) if stringStartsWith(funcName, "window") && stringRight(funcName, 5) == "event" ; Announce what's being done to the window by its name. ; All window*event functions take an hwnd as first parameter. ; Example output: "JAWS Script Manager - [default.jss] resized" ; Don't try this at home unless you want a lot of speech! var string verb = stringChopLeft(stringChopRight(funcName, 5), 6) sayString(formatString("%1 %2", getWindowName(hwnd), verb )) endIf endFunction -- Doug Lee, Senior Accessibility Programmer SSB BART Group - Accessibility-on-Demand mailto:doug.lee@xxxxxxxxxxxxxxxx http://www.ssbbartgroup.com "While they were saying among themselves it cannot be done, it was done." --Helen Keller __________� 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