Hold mouse

The Nuance website provides the following commands:

To click and hold the mouse

  • Say <span =“Say” ns=“https://www.w3.org/1999/” style="-sizing: border-; font-style: italic;">Hold mouse or <span =“Say” ns=“https://www.w3.org/1999/” style="-sizing: border-; font-style: italic;">Press mouse.
  • Say <span =“Say” ns=“https://www.w3.org/1999/” style="-sizing: border-; font-style: italic;">Release mouse to release the mouse button.
These commands appear to do nothing for me.

Is the functionality provide in adjunct programs, please?

Mark Phillipson had posted a link to a utility he created:


Thank you, RonK. Every time I encounter a problem in this line, some brilliant person has already found a solution.

Since I do not understand much about scripts etc. I will try to work through this. I tried to recover the code by optical character recognition from the image, but the original detail is not good enough. There are a few characters that I cannot read.

I will report on how it goes, but Mark Phillipson’s approach is spot on.

Wait a few days.

Mark or someone else may respond.

Thank you, RonK. Rather oddly, I put a section of the code into Google and found what appears to be the same code:


I failed in implementing it. So I will need to search for further guidance.

Well all right then ;-)

With Dragon loaded say: 'add new command'
Command Type is: Advanced Scripting
Delete the default Sub Main/ End Sub lines in the script part.
Now paste the following:

Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, _
ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, _
ByVal dwExtraInfo As Long)
Type POINTAPI 'Declare types
x As Long
y As Long
End Type
Declare Function GetCursorPos Lib "user32" _
(lpPoint As POINTAPI) As Long 'Declare API
Sub Main
Dim z As POINTAPI 'Declare variable
Dim xpos As Long, ypos As Long
GetCursorPos z 'Get Coordinates
xpos = CLng(z.x)
ypos = CLng(z.y)
If ListVar1 = "Release" Then
Select Case ListVar2
Case "Left"
mouse_event MOUSEEVENTF_LEFTUP, xpos, ypos, cButt, dwEI
Case "Right"
mouse_event MOUSEEVENTF_RIGHTUP, xpos, ypos, cButt, dwEI
Case "Center", "Middle"
mouse_event MOUSEEVENTF_MIDDLEUP, xpos, ypos, cButt, dwEI
End Select
Select Case ListVar2
Case "Left"
mouse_event MOUSEEVENTF_LEFTDOWN, xpos, ypos, cButt, dwEI
Case "Right"
mouse_event MOUSEEVENTF_RIGHTDOWN, xpos, ypos, cButt, dwEI
Case "Center", "Middle"
mouse_event MOUSEEVENTF_MIDDLEDOWN, xpos, ypos, cButt, dwEI
End Select

End If
End Sub

Then click on the Name Editor button. The command name is:
These are the two lists this command uses. Currently they are empty.
Double-click the first one (leftrightcenter) in the 'Lists used in this command' section and type the following:


Now double-click the one right below (releasehold) and type:


Confirm with OK

Finally click SAVE to save your command.

Now the command should work and you can issue the following commands:

Hold Left
Release Left
Hold Right
Release Right
Hold Center
Hold Middle
Release Middle

Did you check out my Easy Guide to Dragon scripting? It explains all these things in a very easy to understand manner:

<edited><editID>Speech1965</editID><editDate>2018-01-17 19:17:58</editDate></edited>
Thank you for coming to the rescue, Rob.

I could not have guessed how to get this implemented, but with your excellent instructions, I completed the job in five minutes and all works immaculately. I can move the specialist "Handshoe Mouse" but I have restricted use of my fingers.

Yes, I have your Easy Guide to hand and I will be working through it over the weekend to get some sort of an introduction to scripting.

Again, I'm very grateful. Regards Stephen.