autohotkey script as a toggle for DNS? Topic is solved
-
- Posts: 16
- Joined: 10 Jun 2016, 10:46
autohotkey script as a toggle for DNS?
I'm trying to toggle Dragon Naturally Speaking's Recognition mode back and forth between spell mode and Dictation & Commands mode with a single keypress. Is there anyway I can do this with AHK? I cant find a keyboard shortcut for it.
Re: autohotkey script as a toggle for DNS? Topic is solved
Hi there!
You need COM to do that:
You need COM to do that:
Code: Select all
SpeechEngine:= ComObjCreate("Dragon.DgnEngineControl")
try
{
SpeechEngine.Register(0)
}
catch, e
{
MsgBox, Can't connect to Dragon
ExitApp
}
dgnrecmodeNormal := 0x0 ; Commands and Dictation mode
dgnrecmodeDictation := 0x1 ; Dictation mode
dgnrecmodeCommand := 0x2 ; Commands mode
dgnrecmodeNumbers := 0x3 ; Numbers mode
dgnrecmodeLetters := 0x4 ; Spell mode
dgnrecmodeMouseMotion := 0x5 ; Mouse Motion mode
OnExit, ExitSub
return
!F11::
SpeechEngine.RecognitionMode:=dgnrecmodeLetters
return
!F12::
SpeechEngine.RecognitionMode:=dgnrecmodeNormal
return
ExitSub:
SpeechEngine.UnRegister(False)
SpeechEngine:=
ExitApp
-
- Posts: 16
- Joined: 10 Jun 2016, 10:46
Re: autohotkey script as a toggle for DNS?
AHA!!!
It didnt work when I tried to paste your code snippet into my script, but as a standalone script it worked perfectly. You sir (or ma'am) are the effing man (or woman)!!!!
It didnt work when I tried to paste your code snippet into my script, but as a standalone script it worked perfectly. You sir (or ma'am) are the effing man (or woman)!!!!
Re: autohotkey script as a toggle for DNS?
When you merge my code with your script the lines up to the first return also need to go in the beginning of your script.
See Auto-execute section here:
https://autohotkey.com/docs/Scripts.htm#auto
See Auto-execute section here:
https://autohotkey.com/docs/Scripts.htm#auto
Thank you!You sir (or ma'am) are the effing man (or woman)!!!!