Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Trouble Regarding Dragon NaturallySpeaking 11 and Using the


  • Please log in to reply
3 replies to this topic
GarlandMP
  • Members
  • 2 posts
  • Last active: Jun 29 2011 04:25 AM
  • Joined: 28 Jun 2011
I'm not sure if this is the correct place for this kind of request, but I was wondering if anybody, in their experience with the newest version of Dragon NaturallySpeaking Premium (either version 11 or 11.5) had any success with using a mouse wheel.

I'm asking because I'm struggling to do this very simple task because of the fact that I cannot use my hands, thanks to a physical disability.

I've been using Dragon NaturallySpeaking over the years, having developed quite an affinity and a large amount of skill, but nowhere can I find any documentation on this.

Any help anyone would be able to provide would be much appreciated and I would like to thank everyone in advance.

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
I don't have any speech recognition software so can't assist as such, but according to this user <!-- m -->http://www.autohotke... ... 055#301055<!-- m --> you can activate hotkeys and thus trigger AutoHotkey commands and scripts.

So if your question is "can I speak a command to use to mousewheel" the answer is probably yes, but you will have to do a bit of trial and error.

The send command <!-- m -->http://www.autohotke...mmands/Send.htm<!-- m --> allows you to send WheelDown/Up, save the code here in a script (say script.ahk) and make sure you have it running.

Now if you can say "press ctrl-m"* it should (fingers crossed) send a mousewheel down?

^m::
Send {WheelDown}
Return

* if you dictate key presses, like "press control x" ... <!-- m -->http://www.autohotke... ... 055#301055<!-- m -->

On the other hand it might not work at all because some times programs install their own mouse and keyboard hooks making it hard for autohotkey to work correctly.

elgin
  • Guests
  • Last active:
  • Joined: --
Hi Garland!

I haven't had my hands on 11.5 yet but as far as I know there is no built in support for the mouse wheel.

Does Dragon Premium have the COM API like the Professional version by any chance? If yes, it would be possible to write a program to feed a few new speech commands to Dragon and have the wheel actions triggered on these commands in a comfortable way.

If you're interested I can maybe patch a little test together on the weekend...

elgin
  • Guests
  • Last active:
  • Joined: --
Just to get back on this. This piece of code implements the speech commands "scroll up", "scroll down" and "scroll up/down one/two/three/four/five":

#Persistent
OnExit, CleanUp

COM_Init()
DVC:= COM_CreateObject("Dragon.DgnVCmd.1")
COM_Invoke(DVC, "Register", "", 1)
DMnu:=COM_Invoke(DVC, "MenuCreate", "Rule", "", 0, "", 1)
COM_Invoke(DMnu, "hWndMenu", 0)
COM_Invoke(DMnu, "Active", True)
LStr:=COM_CreateObject("Dragon.DgnStrings")
COM_Invoke(Lstr, "Add", "one")
COM_Invoke(Lstr, "Add", "two")
COM_Invoke(Lstr, "Add", "three")
COM_Invoke(Lstr, "Add", "four")
COM_Invoke(Lstr, "Add", "five")
COM_Invoke(DMnu, "ListSetStrings", "numbers", Lstr)
COM_Release(Lstr)
COM_Invoke(DMnu, "Add", 1, "scroll up","cat","desc","up",0)
COM_Invoke(DMnu, "Add", 1, "scroll up <numbers>","cat","desc","up",0)
COM_Invoke(DMnu, "Add", 1, "scroll down","cat","desc","down",0)
COM_Invoke(DMnu, "Add", 1, "scroll down <numbers>","cat","desc","down",0)
COM_ConnectObject(DVC, "On")
Return

OnCommandRecognize(prms)
{
  pact := COM_DispGetParam(prms, 2, 8)
  plist := COM_DispGetParam(prms, 3, 9)
  plc:=COM_Invoke(plist, "Count")
  pls:=1
  if plc>0
  {
    plt:=COM_Invoke(plist, "Item", 1)
    if (plt="one")
    {
      pls:=1
    }
    else
    if (plt="two")
    {
      pls:=2
    }
    else
    if (plt="three")
    {
      pls:=3
    }
    else
    if (plt="four")
    {
      pls:=4
    }
    else
    if (plt="five")
    {
      pls:=5
    }
  }
  if (pact="up")
  {
    SendInput, {WheelUp %pls%}
  }
  else if (pact="down")
  {
    SendInput, {WheelDown %pls%}
  }
}

CleanUp:
  COM_Invoke(DVC, "UnRegister")
  COM_Release(DVC)
  COM_Term()
ExitApp

It needs the COM Standard Library http://www.autohotke...topic22923.html to work and Dragon needs to be running when this script is started as it does no checking whatsoever. It definitely works with the professional versions of Dragon 10 and 11 and may very well run with other versions, too. Please post here if you try it with another version.