scroll wheel to click?

Ask gaming related questions (AHK v1.1 and older)
Sashkon
Posts: 35
Joined: 23 Dec 2017, 05:13
Contact:

scroll wheel to click?

31 Mar 2020, 14:02

how to remap scroll wheel to mouse clicks? I want to click very fast with scroll wheel
I tried this code, but if scroll fast 180°it will click only 1 time

Code: Select all

WheelUp::Click
WheelDown::Click
I clicking here https://www.click-test.com/
User avatar
Scr1pter
Posts: 1278
Joined: 06 Aug 2017, 08:21
Location: Germany

Re: scroll wheel to click?

31 Mar 2020, 14:28

I reached over 200.

Code: Select all

WheelUp::
WheelDown::
Send {lbutton 20}
return
Play with the value.

Edit
Could be necessary that you work with this:

Code: Select all

Loop, 10
{
Send {lbutton down}
Sleep, 50
Send {lbutton up}
}
Some applications need longer mouse clicks.

Cheers!
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Sashkon
Posts: 35
Joined: 23 Dec 2017, 05:13
Contact:

Re: scroll wheel to click?

31 Mar 2020, 15:04

@Scr1pter
I just want to scroll to ease hand pain while clicking rapidly in programs, so i don't need extra clicks
With mousewheel i can press exact times fast how i need...
vsub
Posts: 541
Joined: 29 Sep 2015, 03:39

Re: scroll wheel to click?

31 Mar 2020, 17:10

How about using a hotkey for that

Code: Select all

F1::
While GetKeyState(A_ThisHotkey,"P")
{
Send {lbutton down}
Sleep, 50
Send {lbutton up}
Tooltip,% A_index
}
ToolTip
Return
PS.Some games\programs will not accept or it will ignore mouse clicks done too fast
Sashkon
Posts: 35
Joined: 23 Dec 2017, 05:13
Contact:

Re: scroll wheel to click?

31 Mar 2020, 17:34

Yes, but i still want to use mousewheel to click... Did you try my code? Is it true that it presses only 1 time if you scroll fast?
vsub
Posts: 541
Joined: 29 Sep 2015, 03:39

Re: scroll wheel to click?

31 Mar 2020, 18:11

It's not very good idea to use the mousewheen to click multiple times at once
If you scroll accidentally too many times,you make encounter problems like not able to stop it until it finishes clicking

The example with the loop example you probably need a sleep after lbutton up or before down
The default delay between keys is 20ms so with that code it does this

lbutton down
sleep 50 ms
lbutton up
sleep 20ms
repeat

Some programs need longer time between click to register them as different clicks(it is not humanly possible to click with 20ms interval and some programs ignore such short delay)

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 94 guests