Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

accessibility issues

2007-06-10
2013-04-26
  • as I mentioned in a previous message, I use speech recognition and that puts rather unique demands on applications.  Right now, all I'm looking for is the ability to enable Select-and-Say.

    http://knowledgebase.nuance.com/view.asp?tnID=5104&sQuery=4247

    essential bits extracted:

    Dragon NaturallySpeaking 7 supports Select-and-Say fully in any window that behaves like a standard edit control.

    A window is considered standard if its window class name is one of the following:

    Edit

    RichEdit

    RichEdit20A

    RichEdit20W

    RichEdit50W

    If the name is not one of those, then an edit control is still considered standard if its window class name and window styles are similar to those of standard edit controls.

    Examples of applications whose edit controls meet the above criteria are WordPad, Notepad, and any application that uses standard Windows dialog boxes such as Open and Save As.

    In certain cases you can tell Dragon NaturallySpeaking to treat a nonstandard window as a standard window so that Select-and-Say works without restrictions. The rest of this tech note explains how to do so.

    Identifying Nonstandard Edit Controls as Standard Windows

    In certain edit controls that do not meet the above criteria, you can tell Dragon NaturallySpeaking to treat the control as a standard window so that Select-and-Say works without restrictions. This capability can be enabled in Dragon NaturallySpeaking version 5 and higher.

    You first need to find out the name of the executable (.exe) file. Sometimes this is the same as the .exe file listed in the properties of the Start menu item or desktop shortcut for the program. Sometimes you need to start the application, then press Ctrl+Alt+Del, choose Task Manager, and look on the Processes tab to find the name of the executable file. Case is significant; frequently the executable name is all uppercase.

    Next you need to find out the class names of any edit controls used in the application.

    Two ways to do this:

       1. Ask the developer of the application.
       2. Use a utility that displays window class names in a running application. Such utilities include Winspector, Window Detective, and the Spy++ utility in Microsoft Visual Studio.

    Once you know the class name(s), complete the following steps to enable Select-and-Say:

              o If Dragon NaturallySpeaking is running, close it.

              o Edit the file nsapps.ini. If Dragon NaturallySpeaking is installed in its default location, you will find this file in C:\Program Files\ScanSoft\NaturallySpeaking\Program (versions 5.*, 6.*, 7.0, and 7.1) or C:\Documents and Settings\All Users\Application Data\ScanSoft\NaturallySpeaking (versions 7.2 and higher).

                Note: Before trying to locate this file, make sure Windows Explorer is set to view hidden files. To do this, click "Tools > Folder Options > View and select "Show hidden files and folders"

              o Add a section for the application. For example, if the application's executable file is called MYAPP, then the section would look like this:

                [MYAPP]
                App Support GUID={dd100104-6205-11cf-ae61-0000e8a28647}

                You must use exactly the same GUID as in the above example. Copy the App Support GUID line above and paste it into nsapps.ini to make sure the GUID is correct.

              o Add a section in which to place the class name(s). For example, if some of the edit controls in MYAPP have the class name TEdit and others have the class name TRichEdit, add the following lines:

                [MYAPP\Enable Class Names]
                TEdit=1
                TRichEdit=2

                The numeric value in the above line tells Dragon NaturallySpeaking what type of edit control the class is compatible with.

                If the control behaves like this     Use this value
                Edit     1
                RichEdit     2
                RichEdit20A     3
                RichEdit20W     4

                If you are not sure which value to use, use trial and error to find the correct value. If the control is a rich-edit control, it is most likely to be compatible with RichEdit20W.

              o Start Dragon NaturallySpeaking.

    To test your settings, put the insertion point in the edit control. Turn the microphone on and start dictating. In version 7 or 8, after pausing, look in the status area of the Dragon bar. If you see the message "Normal mode," you have made the settings correctly. If you see the message "Dictating to a nonstandard window," the settings are incorrect. In versions 5 and 6, you need to dictate some text and then try using "select < words >" commands to find out whether the settings are correct.

    If the settings are incorrect, make sure you have correctly identified the name of the application's executable file. Also, in some cases it may help to add the version number. You can find the version number by right-clicking the executable file, then clicking Properties, then clicking the Version tab. For example, if the version of MYAPP in the above example is 1.00, try the following settings:

    [MYAPP|1.00]
    App Support GUID={dd100104-6205-11cf-ae61-0000e8a28647}

    [MYAPP|1.00\Enable Class Names]
    TEdit=1
    TRichEdit=2

    If text appears in the results box but not in the application after you dictate, you have made the settings correctly but the edit control cannot be supported through this mechanism. See "Dictating into a Nonstandard Window" below.

    If "Normal mode" appears in the DragonBar and you can dictate text into the document, continue testing to make sure select-and-say is working correctly. Try using "select < words >" commands to select text and dictating over it, and try correcting text at the top, middle, and bottom of the control using both the Quick Correct menu and the Spell dialog. Also try typing text and then selecting it with a "select " command. If any of these functions fails to work properly, either you have misidentified the type of edit control (experiment with all of the values 1 through 4 in nsapps.ini) or the edit control cannot be supported through this mechanism.
    -----------

    Anyway, that's where I need to know to get what I need to write code reasonably effectively.  if it's way too much work, I understand.  No blame.  I just appreciate your listening.

     
    • Hi Eric, long message and looks interesting. I will answer tomorrow. ;)

       
    • Hm, I would suggest asking in the wxpython-mailing list (Robin Dunn)
      (he wrapped the scintilla text control (styled text control) from scintilla/wxwidgets source into wxPython and/or better Neil Hodgson, creator of the scintilla text control.