KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: VBA Inconsistency with Dragon Professional Individual
Topic Summary: SendKeys format is different on Windows 7 and Windows 10
Created On: 07/28/2016 03:49 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 VBA Inconsistency with Dragon Professional Individual   - Todd - 07/28/2016 03:49 AM  
 VBA Inconsistency with Dragon Professional Individual   - danw700 - 07/28/2016 07:23 AM  
 VBA Inconsistency with Dragon Professional Individual   - Lunis Orcutt - 07/28/2016 03:38 PM  
 07/28/2016 03:49 AM
User is offline View Users Profile Print this message

Author Icon
Advanced Member

Posts: 172
Joined: 02/03/2008

I realize problems with the use of the VBA SendKeys function with DPI on Windows 10 has been discussed.  So, if the questions I pose below have already have been answered, please feel free to direct me to the relevant thread.


I have created thousands of Dragon NaturallySpeaking advanced scripts over several years.  These commands have worked consistently with all versions of DNS Pro 8 through 13.  However, quite a number of the commands utilizing SendKeys do not work with DPI on Windows 10.  What I do not understand is that all of these commands work with DNS Pro 13 on both Windows 7 AND Windows 10 as well as with DPI on Windows 7, but not with DPI on Windows 10.


I was able to ascertain that specific "nonstandard" and special keystrokes do not work with SendKeys with DPI on Windows 10.  Such keystrokes include:


    {Pad0}, {Pad1}, {Pad+}, etc.


For example,


    SendKeys "{Space}"


displays a VBA error on Windows 10, but not on Windows 7.  I am not particularly concerned with the numeric keypad keystrokes (which are in no way supported by VBA), but the other keystrokes are used enough in my custom commands to create serious problems.


In researching the issue, I learned that standard VBA requires the above keystrokes (ignoring the numeric keypad keys) be used with SendKeys in the following fashion:


    SendKeys "{ }"    'a spacebar
    SendKeys "{{}"   'an open-brace
    SendKeys "{(}"    'an open-parenthesis
    SendKeys "{}}"   'a close-brace
    SendKeys "{)}"   'a close-parenthesis


(Actually, the above format for an open-brace and open-parenthesis has always been necessary with DNS.)  If I make these changes, the commands once again work with DPI on Windows 10.  HOWEVER, the commands then fail with DPI on Windows 7.


I am perplexed that VBA behaves differently on Windows 7 than on Windows 10.  After all, the same compiler in DPI is being used.  Also, the fact that the problem does not occur with DNS Pro 13 on Windows 10 indicates the problem lies with DPI and not the Windows 10 operating system.  Can someone explain the inconsistency?


I realize using SendDragonKeys could solve the problem, but it is unrealistic to make such changes to literally thousands of commands.  Changing the offending keystrokes, on the other hand, would be doable if there was a consistent format.  Use of the Chr() function (to produce the keystrokes) is also inconsistent between Windows 7 and Windows 10 with DPI.  Suggestions?


Thank you.




Todd Kermit

Dragon Professional Individual 15.61, Intel Core i7-10700K, 16GB RAM, Windows 10 Pro, Plantronics CS55/Andrea PureAudio USB-SA

32306 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 0 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 382 guests browsing this forum, which makes a total of 382 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.