KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Hold Right Click
Topic Summary:
Created On: 04/27/2022 01:18 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Hold Right Click   - dmxsixersfan - 04/27/2022 01:18 PM  
 Hold Right Click   - dmxsixersfan - 04/28/2022 04:35 PM  
 Hold Right Click   - Lunis Orcutt - 04/28/2022 06:09 PM  
 Hold Right Click   - Alan Cantor - 04/28/2022 08:24 PM  
 Hold Right Click   - Matt_Chambers - 04/29/2022 11:45 AM  
 Hold Right Click   - Alan Cantor - 04/29/2022 11:50 AM  
Keyword
 04/27/2022 01:18 PM
User is offline View Users Profile Print this message

Author Icon
dmxsixersfan
New Member

Posts: 2
Joined: 04/26/2022

I am disabled and I want to make a script to hold right click for seven seconds and then release it. I have no idea how to write the script. If somebody could help me I would appreciate it.

 04/28/2022 04:35 PM
User is offline View Users Profile Print this message

Author Icon
dmxsixersfan
New Member

Posts: 2
Joined: 04/26/2022

It says there is a scripting error.
 04/28/2022 06:09 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 39833
Joined: 10/01/2006

Apologies, we can see the problem (stupid mistake on our part) but we don't have time to tackle this command now because we are unable to use Dragon on Windows 11 and are temporarily stuck with Voice Access (Alpha). We have been working on those issues for the last few weeks and continue...

 

We have deleted our previous post which is way off the mark



-------------------------

Change "No" to "Know" w/KnowBrainer 2020
Trial Downloads
Dragon/Sales@KnowBrainer.com 
(615) 884-4558 ex 1



 04/28/2022 08:24 PM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 4313
Joined: 12/08/2007

1. In the Command Browser, go to the "Script" pane.

2. Create a new command.

3. Type the name of the command in the "MyCommand" field, maybe something like this: "Hold Right Button"

4. Set "Availability" to "Global"

5. Change "Command Type" to "Advanced Scripting"

6. Delete everything in the "Script" area and paste this:

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)
Const MOUSEEVENTF_RIGHTDOWN = &H8
Const MOUSEEVENTF_RIGHTUP = &H10

Sub Main()
mouse_event MOUSEEVENTF_RIGHTDOWN, 0&, 0&, 0&, 0&
Wait 7
mouse_event MOUSEEVENTF_RIGHTUP, 0&, 0&, 0&, 0&
End Sub

7. Save it.

8. Test it.
 04/29/2022 11:45 AM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 569
Joined: 08/09/2018

Good work, Alan!
 04/29/2022 11:50 AM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 4313
Joined: 12/08/2007

Thanks, Matt. All I did to find an answer was to Google!
KnowBrainer Speech Recognition » Commands, Scripts, and Macros - Dragon » Hold Right Click

Statistics
32307 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 0 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 478 guests browsing this forum, which makes a total of 478 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.