KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Commands for scrolling with the mouse wheel
Topic Summary:
Created On: 05/07/2021 12:50 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Commands for scrolling with the mouse wheel   - thalon - 05/07/2021 12:50 PM  
 Commands for scrolling with the mouse wheel   - wristofdoom - 05/07/2021 01:39 PM  
 Commands for scrolling with the mouse wheel   - thalon - 05/10/2021 01:26 PM  
 Commands for scrolling with the mouse wheel   - Lunis Orcutt - 05/07/2021 05:45 PM  
 Commands for scrolling with the mouse wheel   - brooklyn cabin - 05/27/2021 11:51 AM  
 Commands for scrolling with the mouse wheel   - wristofdoom - 05/07/2021 06:33 PM  
 Commands for scrolling with the mouse wheel   - Mphillipson - 05/09/2021 11:16 AM  
 Commands for scrolling with the mouse wheel   - Edgar - 05/09/2021 12:35 PM  
 Commands for scrolling with the mouse wheel   - kkkwj - 05/10/2021 02:09 AM  
Keyword
 05/07/2021 12:50 PM
User is offline View Users Profile Print this message

Author Icon
thalon
Senior Member

Posts: 94
Joined: 03/19/2015

today, I implemented two commands to scoll with the mouse wheel, which I'd like to share with you. I find them very useful, especiallyin web apps which implement their own scroll bar.

Command: mouse wheel <1to100> down

Declare Function mouse_event Lib "user32.dll" (ByVal dB As Long, ByVal dX As Long, ByVal dY As Long, ByVal dP As Long, ByVal dE As Long) As Long

 

Sub Main

  dist = CInt(ListVar1)

  mouse_event(&H800,0,0,-120*dist,0) 

End Sub

Command: mouse wheel <1to100> up

Declare Function mouse_event Lib "user32.dll" (ByVal dB As Long, ByVal dX As Long, ByVal dY As Long, ByVal dP As Long, ByVal dE As Long) As Long

 

Sub Main

  dist = CInt(ListVar1)

  mouse_event(&H800,0,0,-120*dist,0) 

End Sub

 05/07/2021 01:39 PM
User is offline View Users Profile Print this message

Author Icon
wristofdoom
Top-Tier Member

Posts: 320
Joined: 09/03/2020

This is great. I needed something like this. I am mostly writing in Jarte where the page up and page down functions move the cursor instead of just moving the page view. I have been relying on the mouse to scroll the page down.

However, I think there's an error in the mouse wheel up code. It seems to be the same as the mouse wheel down code.

I fixed it by changing "-120" to "120"


---


Command: mouse wheel <1to100> up

Declare Function mouse_event Lib "user32.dll" (ByVal dB As Long, ByVal dX As Long, ByVal dY As Long, ByVal dP As Long, ByVal dE As Long) As Long


Sub Main

dist = CInt(ListVar1)

mouse_event(&H800,0,0,120*dist,0)

End Sub

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

Dragon Professional Individual v15.6. Windows 10. Knowbrainer 2017.

 05/10/2021 01:26 PM
User is offline View Users Profile Print this message

Author Icon
thalon
Senior Member

Posts: 94
Joined: 03/19/2015

Originally posted by: wristofdoom However, I think there's an error in the mouse wheel up code. It seems to be the same as the mouse wheel down code. I fixed it by changing "-120" to "120"

Oh yes, sorry, that was my fault. I copied and pasted the code below into the text (from above, not from the command center) and the error crept in. Thanks for the correction!

 05/07/2021 05:45 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 39770
Joined: 10/01/2006

Have you checked out your existing KnowBrainer 2017 (w/2020 AI Commands) Wheel <direction><1to1000> command? Courtesy of Rüdiger Wilke by way of Mike Jerry



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

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

 05/27/2021 11:51 AM
User is offline View Users Profile Print this message

Author Icon
brooklyn cabin
Top-Tier Member

Posts: 345
Joined: 02/01/2013

Lunis, thank you for the reminder about this "Wheel" direction. I was just about to post a question/frustration about not being able to navigate up and down in LinkedIn pop-up windows.
Gratefully,
Dan

 05/07/2021 06:33 PM
User is offline View Users Profile Print this message

Author Icon
wristofdoom
Top-Tier Member

Posts: 320
Joined: 09/03/2020

I didn't realize it was in there. Now I've got 2 commands they do the same thing. Story of my life.

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

Dragon Professional Individual v15.6. Windows 10. Knowbrainer 2017.

 05/09/2021 11:16 AM
User is offline View Users Profile Print this message

Author Icon
Mphillipson
Top-Tier Member

Posts: 291
Joined: 09/22/2014

Not sure why there is a mouse wheel left or right. I thought wheels can only go one direction or the other i.e. up or down

 

As per this link



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

Thanks Mark


 


Dragon Professional Advanced Scripting/KnowBrainer Scripts
Video Examples of Coding by Voice

 05/09/2021 12:35 PM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1260
Joined: 04/03/2009

My Logitech Trackman mouse (M570)'s wheel has forward, backward, right, left and click (press down to get a "wheel clip"). I think there are keyboards with nubs positioned centrally within the keys which also do left, right, forward & backward). I'm not sure how track pads present but they also do (at a bare minimum) before Cardinal directions.

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

-Edgar
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors

 05/10/2021 02:09 AM
User is offline View Users Profile Print this message

Author Icon
kkkwj
Top-Tier Member

Posts: 865
Joined: 11/05/2015

Hi Mark, I have a standard Microsoft fat mouse and have had mouse wheels that tilt left and right for years. For the most part, the tilting is pretty useless for me. It would scroll windows left/right if the bottom scroll bar was showing, but how often does that happen? Not often, for me.

 

I also have the wheel click (like Edgar mentioned above), but I never use it. You click to put an anchor marker on the screen, and then move the mouse up/down/left/right to start smooth scrolling. The farther from the anchor you move, the faster the scrolling proceeds.



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

Win10/11/x64, AMD Ryzen 7 3700X/3950X, 64/128GB RAM, Dragon 15.3, SP 7 Standard, SpeechStart, Office 365, KB 2017, Dragon Capture, Samson Meteor USB Desk Mic, Amazon YUWAKAYI headset, Klim and JUKSTG earbuds with microphones, 3 BenQ 2560x1440 monitors, Microsoft Sculpt Keyboard and fat mouse



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

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