Can you make Dragon NaturallySpeaking talk using an autohotkey script?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Elgin
Posts: 124
Joined: 30 Sep 2013, 09:19

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

Post by Elgin » 26 May 2023, 13:54

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 ;)

Elgin
Posts: 124
Joined: 30 Sep 2013, 09:19

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

Post by Elgin » 02 Jun 2023, 13:10

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)

Post Reply

Return to “Ask for Help (v1)”