KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Is it possible to call dgnEngine from C# to have Dragon run a command?
Topic Summary: Kind of like running HeardWord from an external program
Created On: 01/03/2021 01:56 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 01/03/2021 05:41 PM
User is offline View Users Profile Print this message

Author Icon
Mphillipson
Top-Tier Member

Posts: 273
Joined: 09/22/2014

I've never gone down the Common Object Model interface route with C#, always just created Advanced or KnowBrainer scripts.

There is an alternative to using SendKeys with C# which is called the InputSimulator

For more information on how to install this and use it please see the following:

https://www.nuget.org/packages/InputSimulator/

This enables you to write code like the following with full IntelliSense support:

InputSimulator inputSimulator = new InputSimulator();
inputSimulator.Keyboard.KeyPress(VirtualKeyCode.BACK);



-------------------------

Thanks Mark


 


Dragon Professional Advanced Scripting/KnowBrainer Scripts
Video Examples of Coding by Voice



 01/03/2021 09:08 PM
User is offline View Users Profile Print this message

Author Icon
dilligence
Top-Tier Member

Posts: 1316
Joined: 08/16/2010

I think you're looking for ComObjCreate("Dragon.DgnEngineControl") to mimic Dragon recognition.

 

The basic idea is roughly the same in most languages like AHK, WinBatch, Quick Macros but also in VBS:

 

DgnEngine:= ComObjCreate("Dragon.DgnEngineControl")

DgnEngine.Register(0)

DgnEngine.RecognitionMimic("stop listening") 

 

In some languages you need to add Dgn.UnRegister as well.

 

Shouldn't be too hard to implement in C#.



-------------------------



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

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