[jawsscripts] Re: script hot key not working

  • From: "David Farough" <David.Farough@xxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Tue, 03 Mar 2009 11:24:35 -0500

Hi Ann:

A few more suggestions:
1.  take a look at the .jkm for your scripts.  Make sure that the
keystroke has been defined for control+m.  You can open this file using
the script manager.  The line should say:
control+m=SayStaticText 
sometimes the keystrokes are not added properly when you define the
script.  always a good idea to check at times like this.

2.  put a saystring at top of SayStaticText  so that you know that the
keystroke is working as expected.

3.  you should add the Sayinteger that I mentioned earlier following
the let assignment for the hwnd handle in your RetrieveStaticText
function.  Your script would look like this:
Let hWnd = GetFirstWindow (hWnd)
sayinteger (hwnd)

If Jaws says 0 then you know that you were unable to find the first
window from your current focus.

I am not clear on what your objective is here.  If you are trying to
get Jaws to speak the static text for the window you captured in the
second node in your message, There is a much easier way to do this than
using the GetWindowRect function.

based on the second node capture in your message, you could use the
FindWindow function to return the handle for this window.

for the FindWindow function, you would specify the name as "Description
of selected component"

Take a look at this function in the FSDN to see what it does and what
parameters are required. 
In your RetrieveStaticText function you could probably do this:

let hwnd = FindWindow (GetAppMainWindow (GetFocus ()), "", "Description
of selected component")
if (hwnd) then 
Let sText = GetWindowName (hwnd)
else 
let sText = "Static text Window not found"
endif
return sText

HTH



David Farough
Application Accessibility Coordinator/coordonateur de l'accessibilité 
Information Technology Services Directorate /
Direction des services d'information technologiques
Public Service Commission / Commission de la fonction publique
Email / Courriel:  David.Farough@xxxxxxxxxxxxx
Tel. / Tél:    (613) 992-2779 
__________ 
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

Other related posts: