![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: Question about <MouseButton_MouseAction> Topic Summary: Created On: 04/29/2022 04:48 PM Status: Post and Reply |
|
![]() |
![]() |
- Mitchell Sturgeon | - 04/29/2022 04:48 PM |
![]() |
![]() |
- Matt_Chambers | - 04/29/2022 04:50 PM |
![]() |
![]() |
- Mitchell Sturgeon | - 04/29/2022 07:53 PM |
![]() |
![]() |
- Matt_Chambers | - 04/30/2022 07:50 AM |
![]() |
![]() |
- dilligence | - 04/30/2022 11:26 AM |
![]() |
![]() |
- Mitchell Sturgeon | - 04/30/2022 07:04 PM |
![]() |
![]() |
- monkey8 | - 04/30/2022 03:16 PM |
![]() |
![]() |
- Matt_Chambers | - 04/30/2022 03:49 PM |
![]() |
|
There is a command called <MouseButton_MouseAction> the code is as follows, and it works as expected: 'Script by Lindsay Adam www.pcbyvoice.com 2011 I found some of the language burdensome, and shortened the highlighted lines in the following way, and now nothing happens when I speak the new command:
'Script by Lindsay Adam www.pcbyvoice.com 2011 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) Sub Main If ListVar1 = "Mouse Hold" then mouse_event (2, 0,0,0,0) If ListVar1 = "Mouse Release" then mouse_event (4, 0,0,0,0) If ListVar1 = "RIGHT Mouse Hold Down" then mouse_event (8, 0,0,0,0) If ListVar1 = "RIGHT Mouse Release" then mouse_event (16, 0,0,0,0) End Sub
Any assistance appreciated
|
|
|
|
![]() |
|
Did you make corresponding changes to the List items that comprise ListVar1?
|
|
|
|
![]() |
|
Thank you. I don't know what that means… What would the syntax be if I just wanted to make a command called "mouse hold" and another command called "mouse release"? |
|
|
|
![]() |
|
It means that you need to edit the name of the command to reflect the changes you made in the script. You need to click on the part of the name that is
|
|
|
|
![]() |
|
The following only applies if you want to implement this voice command in Dragon® (i.e via the Dragon© Command Browser).
If this is meant to be a KnowBrainer command, then Lunis will probably explain to you how to do that (but the syntax should be the same).
I attached the command for you as well. Simply import it into your Dragon® Command Browser (overwrite the current command if the old one exists and you should be good to go):
By the way, performing mouse buttons operations via Advanced Scripting is not the fastest way. You may want to check out Press Utility© which is part of SP 7 Standard. This works much faster, there won't be any scripting hassle and you have many, many more options.
Here is the Demonstration Video. ------------------------- Turbocharge your Dragon productivity with 40+ Power Addons |
|
|
|
![]() |
|
Thanks everyone! It's working. |
|
|
|
![]() |
|
As Matt says you need to change the names in the list as well as in the command. Although Rob has shown you how to do this with Dragon to do this with KB first of all open the command from the KB sidebar. Then click on "Edit Name". Then look at all the lists on the left hand side of the dialogue and find the list called "MouseButton_MouseAction". Once you find the list then click on "edit selected list" and then change the command name in the list to match what you changed in the script.
In terms of speed those commands should be absolutely instantaneous with KB. ------------------------- |
|
|
|
![]() |
|
Yes, the speed should be fine.
|
|
|
FuseTalk Standard Edition v4.0 - © 1999-2023 FuseTalk™ Inc. All rights reserved.