The professional version of Dragon Naturally speaking (DNS) is the only version that offers linking macros with proper voice command phrases.
I mean launching macros with meaningful spoken phrases like "go to my project folder 1", not just hot key presses like "Press Alt Alpha".
But Boo Hoo Woo it's like around 400 to 500 pritish pounds :-(
The preferred edition is however a fraction the cost at around 70 pounds. With the preferred edition you can only however paste text and graphics, there is no macro support.
Whey hey, I have however figured out how using Autohotkey to provide free and fast macro support for the Preferred edition and I have tried it on version 9.5 on vista (NOTE my method won't work for the standard edition).
Basically it relies on scrapping the results box and then firing off the respective macro. So in tools options view of DNS you need to set the results box so that it is always displayed.
Instructions:-
1) In tools options view of DNS you need to set the results box so that it is always displayed.
2)For each macro you want to set up. In the DNS command browser enter a new text command with the name as the phrase you want to launch your macro with and enter the ¬ character only in the content box.
You have to enter the ¬ character as DNS will not let you save it with no characters in it. The ¬ will be sucked out by the secound script on running the macro.
3) After DNS is running run the following two scrips. Note there are just two macro examples in the first script named "click top left" and "click some where else", you will want to add more. Be sure in step 2) above to have added in the commands "click top left" and "click some where else".
The label that will be jumped to run the macro in the first script is shown in a tool tip at the top of the screen. The secound script monitors for the ¬ character and strips this out.
4) If it fails to work try reloading the first script when the DNS results box is showing.
5) This does work well and is quick but please post any improvements here or better Ideas to link autohotkey to the non-professional versions of dragon naturally speaking.
6) Please let me know here how you get on
Note: at time of writting (correct me if I am wrong) I think that DNS does not run on the 64bit vista version just on the 32bit one. Most computers sold with vista however use the 32bit version even if the underlying chips are 64bit.
SCRIPT 1:-
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
CoordMode, ToolTip, Screen
WinGet, active_id, ID, A
Loop,
{
; This will visit all windows on the entire system
WinGet, id, list,,, Program Manager
Loop, %id%
{
this_id := id%A_Index%
WinGetClass, this_class, ahk_id %this_id%
WinGetTitle, this_title, ahk_id %this_id%
len1:=StrLen(this_title)
StrA:= Substr(this_title, 1, len1)
if (this_class="#32770" and StrA<>"DragonBar"){
Loop,
{
WinGetTitle, this_title, ahk_id %this_id%
len1:=StrLen(this_title)
StrB:= Substr(this_title, 1, len1)
StringLower, StrB, StrB
Endchar:=SubStr(StrB, len1, 1)
if (Endchar=" " and len1>1){
len1:=len1 - 1
StrB:= Substr(StrB, 1, len1)
}
StringSplit, StrArray, StrB, %A_Space%, %A_Space%
StringReplace, StrB, StrB, %A_SPACE%,, All
StringReplace, StrB, StrB, ...,, All
if (strlast<>StrB){
strlast:=StrB
if (StrLen(StrB)<>0){
char1:=SubStr(StrB, 1, 1)
if (char1>="a" and char1<="z"){
if (IsLabel(StrB)){
gosub %StrB%
ToolTip, %StrB% (custom), 600, 5
} else {
ToolTip, %StrB%, 600, 5
}
}
}
}
Sleep, 20
}
}
}
Sleep, 5000
}
clicktopleft:
;-----------------------------------------------------------------------
CoordMode Pixel, screen
CoordMode, Mouse, Screen
MouseMove, 0, 0, 0
MouseClick, left
return
clicksomewhereelse:
;-----------------------------------------------------------------------
CoordMode Pixel, screen
CoordMode, Mouse, Screen
MouseMove, 100, 200, 0
MouseClick, left
return
SCRIPT2 put this in a seperate script and run seperately
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#NoTrayIcon
loop,
{
;clipWait
sleep, 20
char1:=SubStr(clipboard, 1, 1)
len1:=StrLen(clipboard)
if (char1="¬" and len1>1){
str1:=SubStr(clipboard, 2, len1-1)
clipboard = %str1%
}
if (char1="¬" and len1=1){
clipboard =
}
}




