Page 2 of 2

Re: Can you make Dragon NaturallySpeaking talk using an autohotkey script?

Posted: 26 May 2023, 13:54
by Elgin
I'm nowhere near my gear, so I can't look anything up but at the very least you need to use
:=
instead of
=

Read up on the difference in the AHK help as it's rather crucial ;)

Re: Can you make Dragon NaturallySpeaking talk using an autohotkey script?

Posted: 02 Jun 2023, 13:10
by Elgin
Tested and works:

Code: Select all

DGNSpeechEngine := ComObjCreate("Dragon.DgnEngineControl")
try
{
   CMDGNSpeechEngine["Engine"].Register(0)
}
catch
{
  MsgBox, CanĀ“t access Dragon.
}
v:=DGNSpeechEngine.Option(0x11)	// returns 0 if not set, -1 if set; setting the option with 1 seems to work fine though
msgbox, % v
v:=not DGNSpeechEngine.Option(0x11)
msgbox, % v
DGNSpeechEngine.Option(0x11):=v
v:=DGNSpeechEngine.Option(0x11)
msgbox, % v
DgnEngine.Unregister(0)