Jump to content
Macro Express Forums

VBscript to control Dragon Naturally Speaking

Recommended Posts

I need to be able to wake up the Dragon microphone from MEP.

I can do this from Microsoft Word like this:


Sub Dragon_Mic_Wake()

Dim dgnengine As New DgnEngineControl

dgnengine.RecognitionMimic "wake up"

End Sub


as long as I reference the "Dragon NaturallySpeaking ActiveX Controls" library found in "dnstk10.dll".


How can I create a similar vbscript in MEP? It seems I need to reference the library first or something.

Link to comment
Share on other sites

Well, a short, workable answer would be using VBScript in the MXPro External Script command to open an existing Word document containing the DNS macro and run it.

Option Explicit
Dim appWD : Set appWD = CreateObject( "Word.Application" )
With appWD
   .documents.open( "doc-file-containing-the-macro.docx" )
   .run "Dragon_Mic_Wake()"
End With
Set appWD = Nothing

It may not be a final solution, and what I just posted is untested typing.

Link to comment
Share on other sites

Thank you for your replies. Regarding Alan's point, that is precisely why I need to be able to control Dragon without using Dragon's hotkeys - with 50+ users I can't get them all to agree on a standard hotkey set. Some have been using various hotkeys for years and are reluctant to change.

Link to comment
Share on other sites

The marvelous reason to have and use MXPro is to give you automation access to any software package in the best ways provided by whomever makes the software. For example, opening applications like Word, Internet Explorer, Outlook, and others in order to directly use their properties, methods, and events is all easily done with MXPro. If DNS has a COM object that provides its properties, methods, and events to external applications then it could also be run and controlled by MXPro using VBScript, JScript, JavaScript, or AutoIt, and such. If not, then MXPro can still automate what you need by doing what Alan has mentioned.


Since your 50+ users have their own preferred set of hot keys, does DNS store them in some sort of accessible profile on the user's workstation? If so then have MXPro read the profile and output whatever hot key that that user has set for themselves.


My other suggestion is that if MXPro does not provide a solution for what you need, then see what may be available on the DNS KnowBrainer.com website forum.


Not that it matters, but as a side note, DNS 12 is my version. However, it is the Preferred version and not the Professional. The Preferred version doesn't allow for command-type macros whereas the other does. I wanted something that enabled me to talk with my computers like Dr. Doliitle did with the animal kingdom. And that is the reason I switched to using Vocola. Vocola has its own script language that allows me to create the commands needed to control my computer as well as being able to have pleasant conversations with MXPro.


Now, does Vocola understand what I am saying? Somewhat. At least as well as DNS and WSR did ... and do. But if three different packages of software, and another human being, have hard time understanding what I am saying then its gotta be me.


Being fairly new to the world of voice recognition, it seems the requirement in dealing with its software is opposite that of dealing with things like MXPro. I train things like MXPro to do what automation needs to be done. But with voice recognition, I have to train myself to do what it wants.


Even though my training is going well, I still had to type all this.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...