KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Question about <MouseButton_MouseAction>
Topic Summary:
Created On: 04/29/2022 04:48 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Question about <MouseButton_MouseAction>   - Mitchell Sturgeon - 04/29/2022 04:48 PM  
 Question about <MouseButton_MouseAction>   - Matt_Chambers - 04/29/2022 04:50 PM  
 Question about <MouseButton_MouseAction>   - Mitchell Sturgeon - 04/29/2022 07:53 PM  
 Question about <MouseButton_MouseAction>   - Matt_Chambers - 04/30/2022 07:50 AM  
 Question about <MouseButton_MouseAction>   - dilligence - 04/30/2022 11:26 AM  
 Question about <MouseButton_MouseAction>   - Mitchell Sturgeon - 04/30/2022 07:04 PM  
 Question about <MouseButton_MouseAction>   - monkey8 - 04/30/2022 03:16 PM  
 Question about <MouseButton_MouseAction>   - Matt_Chambers - 04/30/2022 03:49 PM  
Keyword
 04/29/2022 04:48 PM
User is offline View Users Profile Print this message

Author Icon
Mitchell Sturge..
New Member

Posts: 15
Joined: 03/10/2019

 

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
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 = "LEFT Mouse Hold Down" then mouse_event (2, 0,0,0,0)
If ListVar1 = "LEFT 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

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

 

 

 

 

 

 

Statistics
32616 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 259 guests browsing this forum, which makes a total of 259 users using this forum.

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